Commit graph

4508 commits

Author SHA1 Message Date
Jakob Bornecrantz 8b654c76cc c/render: Spelling 2022-08-25 16:58:03 +01:00
Jakob Bornecrantz 7a52814c26 c/render: Code style 2022-08-25 16:58:03 +01:00
Jakob Bornecrantz e02f47ef72 c/null: Request VK_KHR_maintenance[1|2] 2022-08-25 16:58:03 +01:00
Jakob Bornecrantz acd5655a79 c/main: Request VK_KHR_maintenance[1|2] 2022-08-25 16:58:03 +01:00
Jakob Bornecrantz 767637abb8 a/vk: Add image view with usage creation helper 2022-08-25 16:57:56 +01:00
Jakob Bornecrantz fa02407726 a/vk: Add mutable R8G8B8A8_[UNORM|SRGB] image creation helper 2022-08-25 16:57:54 +01:00
Jakob Bornecrantz a5efaceba5 a/vk: Add small chain helper 2022-08-25 16:57:36 +01:00
Jakob Bornecrantz e79b23275b a/vk: Remove unused vk_get_access_flags function 2022-08-25 15:06:09 +01:00
Jakob Bornecrantz 90f3adcdd1 a/vk: Group code 2022-08-25 15:06:09 +01:00
Jakob Bornecrantz e7c217cea5 a/vk: Track various limits 2022-08-25 15:06:09 +01:00
Jakob Bornecrantz b0f51acf77 a/vk: Track maintenance extensions 2022-08-25 15:05:44 +01:00
Jakob Bornecrantz fc55d623c0 xrt: Deal with vulkan underscore compat issues 2022-08-25 15:05:14 +01:00
Christoph Haag 3c9ef82060 a/math: Add math_matrix_4x4_transform_vec3 2022-08-25 12:41:07 +01:00
Jakob Bornecrantz 06ee685e9a c/util: Enable swapchain to be sub-classed 2022-08-24 19:56:42 +00:00
Jakob Bornecrantz d578203a8e c/util: Refactor comp_swapchain interface a bit 2022-08-24 19:56:42 +00:00
Jakob Bornecrantz ff4ce5f7e2 d/remote: Reset timout argument to select
Select can modify the argument, so need to reset it.
2022-08-24 14:36:56 +01:00
Ryan Pavlik 570f27d486 st/oxr: Wire up Win32 OpenGL 2022-08-22 19:53:50 +00:00
Jakob Bornecrantz a681252ac1 st/oxr: Tidy includes 2022-08-22 19:53:50 +00:00
Ryan Pavlik bdcc5be476 c/client: Win32 OpenGL client compositor
Co-authored-by: Milan Jaros <milan.jaros@vsb.cz>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2022-08-22 19:53:50 +00:00
Milan Jaros afe84a2c35 c/client: Swapchain for Win32 GL
Co-authored-by: Ryan Pavlik <ryan.pavlik@collabora.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2022-08-22 19:53:50 +00:00
Ryan Pavlik dc470ca6fe c/client: Adjust minimum GL version for clients to 3.0.0. 2022-08-22 19:53:50 +00:00
Ryan Pavlik fc0f390a87 aux/ogl: Add WGL wrapper to the build. 2022-08-22 19:53:50 +00:00
Ryan Pavlik 483b0ecbc9 xrt: Header for Win32 OpenGL. 2022-08-22 19:53:50 +00:00
Ryan Pavlik f2967e834c xrt: Include wingdi.h for WGL 2022-08-22 19:53:50 +00:00
Moses Turner 4de631285b u/hand: Fix finger ordering 2022-08-22 13:19:48 +01:00
Ryan Pavlik 1b02783113 d/sample: Clean up, specify a blend mode 2022-08-18 16:45:45 -05:00
Jakob Bornecrantz 074121e371 st/oxr: Use correct device to check for hand tracking support 2022-08-15 15:57:42 +00:00
Jakob Bornecrantz 97874a524a st/oxr: Remove old unused device role index system 2022-08-15 15:57:42 +00:00
Jakob Bornecrantz 4fa509034d st/oxr: Print out all roles 2022-08-15 15:57:42 +00:00
Jakob Bornecrantz 2632c2239d c/multi: Start and stop the native session
This depends on the number of active app sessions.
2022-08-15 14:46:26 +00:00
zhibinw 601143bfb7 st/oxr: Support FOCUSED to SYNCHRONIZED transfer in oxr_session_poll 2022-08-15 14:38:18 +01:00
Jakob Bornecrantz 8e70290ec1 d/opengloves: Pass in identity pose to hand simulation 2022-08-14 16:16:27 +01:00
Jakob Bornecrantz 936733d4b7 d/vive: Pass in identity pose to hand simulation 2022-08-14 16:16:27 +01:00
Jakob Bornecrantz d978a863c1 d/vive: Tidy 2022-08-14 16:16:27 +01:00
Jakob Bornecrantz 7e24b1dfe7 u/hand: Move common init into init helper function 2022-08-14 16:16:27 +01:00
Jakob Bornecrantz e6efcd7a02 u/hand: Take xrt_hand enum instead of bool 2022-08-14 16:16:27 +01:00
Jakob Bornecrantz 2b05bfc709 u/hand: Constify arguments 2022-08-14 16:16:27 +01:00
Jakob Bornecrantz dc28c1f04a d/remote: Fix hand tracking 2022-08-14 16:16:27 +01:00
Jakob Bornecrantz f535135c13 d/survive: Fix warning and org code (NFC) 2022-08-14 13:19:00 +01:00
Moses Turner 386117c5ee NFC: a/math: Make math_quat_from_swing prettier 2022-08-13 19:31:58 +00:00
Simon Zeni 778900cd3c c/main: add hmd peek window 2022-08-12 14:19:13 -04:00
Jakob Bornecrantz b6cab2fe07 c/main: Treat cube as the other optional layers 2022-08-11 13:42:17 +01:00
Simon Zeni 90f708d91c xrt: Enable XR_KHR_composition_layer_cube
Co-authored-by: Bjorn Swenson <bjorn@collabora.com>
2022-08-11 13:42:09 +01:00
Jarvis Huang 5063e76d16 ipc: Update active client id while activate session changed 2022-08-11 11:57:07 +08:00
Jan Schmidt f8a486884b u/u_json: Implement u_json_get_int_array() 2022-08-10 18:30:08 +01:00
Jan Schmidt ce13de9484 aux/math: Add math_matrix_3x3_from_quat()
Add a function to get a 3x3 rotation matrix
from a quaternion.
2022-08-10 18:30:08 +01:00
Moses Turner e5466553a2 d/euroc: Allow zero timestamps
Negative timestamps are still not allowed, but artificially generated datasets might start at exactly zero
2022-08-10 15:09:53 +00:00
Jakob Bornecrantz d6df203d03 d/opengloves: Fix warning (NFC) 2022-08-10 16:03:33 +01:00
Mateo de Mayo dabf592d59 t/euroc: Add lock for IMU recording queue 2022-08-10 14:28:59 +00:00
Jakob Bornecrantz 39f80f2ef5 d/vive: Remove unsued variable 2022-08-10 14:18:45 +00:00
Jakob Bornecrantz 54b43f1f31 t/common: Fix warnings in lighthouse builder 2022-08-10 14:18:45 +00:00
Jakob Bornecrantz 45e268dd16 st/oxr: Don't use mysterious time variable for error printing 2022-08-10 14:18:45 +00:00
Jakob Bornecrantz 42f5cf4c9d d/opengloves: Use correct argument when casting 2022-08-10 14:18:45 +00:00
Aidan Thornton 3485babd71 comp: rotate the compute compositor's distortion texture
Some devices like Android smartphones have displays which are
rotated, meaning the compositor needs to rotate its output.

Add support for this to the compute compositor by rotating the
contents of the textures it uses for distortion lookups. This
requires postponing the calculation of that texture and adding
code to recreate it if the rotation changes (which is allowed,
but unlikely to happen in practice.)
2022-08-10 12:39:44 +00:00
Aidan Thornton 4840def448 a/math: add math_matrix_2x2_transform_vec2 2022-08-10 12:39:44 +00:00
Jan Schmidt 96fb9ce34a wmr: Clean up camera debug last.
Make sure to stop the USB thread before destroying the debug sink
as cancelling the transfers is not sufficient to guarantee
there will be no final callback (or one in progress)
2022-08-08 17:31:53 +00:00
Ryan Pavlik 11525976fa c/client: Fix doc warning 2022-08-08 16:44:24 +00:00
Ryan Pavlik 831c2aefaf a/math: Fix doc warning 2022-08-08 16:44:24 +00:00
Ryan Pavlik e6da9b8090 a/d3d: Fix doc warning 2022-08-08 16:44:24 +00:00
Ryan Pavlik 094498dbf3 a/vk: Fix up and factor out external image support check 2022-08-08 16:44:24 +00:00
bjorn 987bc48edc Fix XrNegotiateRuntimeRequest::structVersion check; 2022-08-08 16:21:40 +00:00
Christoph Haag c24e482e5e st/oxr: Make OpenXR timestamps relative to service startup
This solves a problem where OpenXR timestamps could become invalid
(negative) in certain circumstances:

The timestamps that the OpenXR state tracker returned were offset such
that they appeared to start at OpenXR application startup time.

However monado-service is a long running service using system timestamps.
Because of this, if monado-service started work using a system timestamp
acquired before an OpenXR application started, then this system timestamp
could not be converted into an OpenXR without becoming invalid.

With this change, the OpenXR timestamps for OpenXR applications are offset
such that they appear to start at monado-service startup time instead.

As a side effect, all OpenXR applications connected to the same
monado-service instance will receive timestamps from the same domain.
2022-08-08 15:52:18 +00:00
Charlton Rodda 996aefe596 Improve validation in xrLocateViews 2022-08-04 19:21:39 +01:00
danwillm c4a290aa97 xrt/util: Fix typo with number of joints per finger 2022-08-01 17:33:40 +00:00
danwillm 76f96686d1 xrt/drivers: Convert hand tracking drivers to use hand simulation
Co-authored-by: Moses Turner <moses@collabora.com>
2022-08-01 17:33:40 +00:00
danwillm 1dee288459 aux/util: Share joint width hand tracking function 2022-08-01 17:33:40 +00:00
danwillm 9e7f814328 aux/util: Remove old hand tracking code 2022-08-01 17:33:40 +00:00
danwillm 9dc8632b0f aux/util: Add u_hand_simulation
Co-authored-by: Moses Turner <moses@collabora.com>
2022-08-01 17:33:40 +00:00
Supreeeme 501d2c4fd5 Fix crash when no hand tracking or controllers 2022-07-31 17:09:19 -04:00
danwillm 72ff5cab80 st/steamvr_drv: add skeletal input from openxr hand tracking
Co-authored-by: Moses Turner <moses@collabora.com>
2022-07-28 12:19:20 +01:00
danwillm 9c9f4bb5c5 st/steamvr_drv: comment out "action binding reloaded" log message 2022-07-28 12:19:20 +01:00
danwillm 75995fede0 external, st/steamvr_drv: update OpenVR to 1.16.8 2022-07-28 12:19:20 +01:00
Christoph Haag ee450e6f29 comp/main: Fix chosen vk display mode debug print 2022-07-27 15:04:31 +02:00
Moses Turner 2868348e8c t/common: Make controllers work again with the Lighthouse builder
!1418 briefly broke controller setup.
2022-07-27 10:49:29 +00:00
Moses Turner 0c4b45c6c2 a/util: Add DEBUG_GET_ONCE_TRISTATE_OPTION 2022-07-27 10:49:29 +00:00
Moses Turner c0eed827c5 xrt: Remove t_hand_tracking_output_space
LEFT_CAMERA is the only one that remained useful
2022-07-27 10:49:29 +00:00
Moses Turner a5c0f0b426 h/mercury: Fix debug log 2022-07-27 10:49:29 +00:00
Jakob Bornecrantz 65d88f00aa t/common: Fix warning 2022-07-26 18:15:04 +00:00
Jakob Bornecrantz 19302a5d21 c/util: Fix warning 2022-07-26 18:15:04 +00:00
Jakob Bornecrantz 086a702b79 c/main: Fix warning 2022-07-26 18:15:04 +00:00
Jakob Bornecrantz 86ae6a5bb1 d/wmr: Fix warning 2022-07-26 18:15:04 +00:00
Ryan Pavlik 3fb162ea3a c/client: Turn off depth formats for D3D11, they are breaking Vulkan right now 2022-07-26 14:45:29 +00:00
Ryan Pavlik 980ad86008 a/vk: Get and show some external buffer data on startup, too. 2022-07-26 14:45:29 +00:00
Ryan Pavlik 490559ee6c st/oxr: Wire in D3D12 support 2022-07-26 14:45:29 +00:00
Ryan Pavlik a4d2740b4b c/client: D3D12 client compositor 2022-07-26 14:45:29 +00:00
Ryan Pavlik a9facfe671 c/client: Extract some utilities usable by D3D11 and 12 2022-07-26 14:45:29 +00:00
Ryan Pavlik 576b158a83 a/d3d: Add some d3d12 features 2022-07-26 14:45:29 +00:00
Ryan Pavlik f718ff151f st/oxr: Add d3d12 support to the extension support header. 2022-07-26 14:45:29 +00:00
Ryan Pavlik 5c24b8e637 xrt: Define D3D12 interface 2022-07-26 14:45:29 +00:00
Ryan Pavlik 189be3300c st/oxr: Add helper to verify compatible usage flags. 2022-07-26 14:45:29 +00:00
Ryan Pavlik ee26b5f575 a/d3d: Split out some d3d11 stuff from generic 2022-07-26 14:45:29 +00:00
Ryan Pavlik 79f86ff0e3 c/client: Fix swapchain leak in D3D11. 2022-07-26 14:45:29 +00:00
Ryan Pavlik 842c160c49 a/util: Guard against bad defs of "max" 2022-07-26 14:45:29 +00:00
Ryan Pavlik 8f55f87f3d build: Let compositor util consumers get to the includes. 2022-07-26 14:45:29 +00:00
Ryan Pavlik a8bb821cf5 ipc: Fix typo 2022-07-26 14:45:29 +00:00
Ryan Pavlik 46ad907dac ipc: Replace size_t usages.
Not safe to use any type whose size differs between 32 and 64 bit builds.
2022-07-26 14:45:29 +00:00
Ryan Pavlik 413c8230ff a/d3d: Clean up formats 2022-07-26 14:45:29 +00:00
danwillm 53bbe0a293 t/common: add opengloves fixer-upper to lighthouse builder 2022-07-25 23:57:45 +01:00
danwillm fd61dd08b2 drivers: add all of opengloves driver 2022-07-25 23:57:45 +01:00
danwillm 0943ce10be a/util, xrt: u_hand_tracking interface change 2022-07-25 23:57:45 +01:00
Mateo de Mayo 36ca9260cf d/vive: Update tracking status to fix segfault
Co-authored-by: Moses Turner <moses@collabora.com>
2022-07-25 19:08:46 +00:00
Mateo de Mayo 6e16959098 d/vive: Add vive_source to convert v4l2 timestamps into monotonic clock
Use a sink in the middle of the stream to correct for v4l2 timestamps with
hardware timestamps to monotonic clock.

This sink, together with other utilities related to data streaming, lives in a
new vive_source entity, with similar functionality to wmr_source or rs_source.

The vive_source lifetime is managed by the builder xfctx, which prevents
deallocation dependencies between vive_device and the v4l2_fs to cause segfaults.
2022-07-25 19:08:46 +00:00
Mateo de Mayo 13d90bff77 d/vive: Implement 3DoF/SLAM switching button and pose offset 2022-07-25 19:08:46 +00:00
Mateo de Mayo f0ceb40f6a d/vive: Prepare data streaming and SLAM tracker 2022-07-25 19:08:46 +00:00
Mateo de Mayo 3cbb7f6b9f d/vive: Pass status of visual tracking into the driver 2022-07-25 19:08:46 +00:00
Mateo de Mayo 4f81967e8a t/common: Refactor lighthouse builder to prepare for more visual trackers
The idea here is to follow a similar approach to how we are doing it in the
WMR driver with the setup_visual_trackers() function.
2022-07-25 19:08:46 +00:00
Mateo de Mayo 8d929fe2fa d/v4l2: Split some definitions into a new header 2022-07-25 19:08:46 +00:00
Mateo de Mayo ae8305f324 u/deque: Add generic wrapper for std::deque 2022-07-25 19:08:46 +00:00
danwillm 6d6ddc0b12 inc/xrt: add XRT_HAVE_BLUETOOTH 2022-07-25 16:20:07 +01:00
danwillm de53e431ed d/multi: fix untested codepath 2022-07-25 15:23:49 +01:00
Nova 0954bd0dd8 d/wmr: Clean up check_and_get_interface in wmr_prober.c 2022-07-25 12:19:48 +01:00
Nova e141aa2d55 d/wmr: Add initial support for original Odyssey HMD 2022-07-25 12:19:48 +01:00
Christoph Haag ffb0346ba4 d/survive: Fix compilation on clang
Fixes error

/home/haagch-collabora/monado/src/xrt/drivers/survive/survive_driver.c:384:53: error: passing 'const union xrt_output_value *' to parameter of type 'union xrt_output_value *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
        int ret = survive_controller_haptic_pulse(survive, value);
                                                           ^~~~~
/home/haagch-collabora/monado/src/xrt/drivers/survive/survive_driver.c:340:89: note: passing argument to parameter 'value' here
survive_controller_haptic_pulse(struct survive_device *survive, union xrt_output_value *value)
2022-07-24 23:48:57 +02:00
Mateo de Mayo 997f4451b8 st/gui: Make debug frame sinks a bit more compact 2022-07-22 16:19:49 +00:00
Mateo de Mayo aaf5fe1b7b d/vive: Improve ticks-to-nanoseconds conversion 2022-07-22 16:19:49 +00:00
Mateo de Mayo aa617a9d8b d/vive: Group 3dof IMU fusion fields and add a mutex 2022-07-22 16:19:49 +00:00
Mateo de Mayo c181909b0d t/slam: Add debug sinks 2022-07-22 16:19:49 +00:00
Moses Turner f6ef1d8f28 d/dai: Add code to control IR floodlight and exposure behind ifdef 2022-07-21 00:23:32 +01:00
Moses Turner 4d0e46a5ac d/dai: Remove depthai::opencv dependency 2022-07-21 00:23:32 +01:00
bjorn 6275c4de10 c/main: comp_renderer uses queue from vk bundle;
The vk bundle currently creates a single queue, calls vkGetDeviceQueue,
and stores it in the bundle.  There's only ever 1 queue from 1 queue
family right now, even when using the compute compositor.

It doesn't really make sense for the renderer to re-request this queue
instead of using the one in the bundle.  If we wanted to store a local
version to it, it should probably be assigned directly (i.e. r->queue =
vk->queue) to ensure that it's the same.  If we decide we want multiple
queues later, that would be a good time to add this sort of thing back.
2022-07-19 16:26:18 +00:00
Ryan Pavlik 12fab0653c xrt: Compositor doc improvement 2022-07-15 16:30:06 -05:00
Ryan Pavlik de4bf3be0a st/oxr: Doc improvment 2022-07-15 15:37:08 -05:00
Ryan Pavlik 4c5327fc65 xrt: Improve code docs 2022-07-15 12:50:04 -05:00
Ryan Pavlik 8f7eed3521 state_trackers: Remove obsolete documentation stub 2022-07-15 12:49:55 -05:00
bjorn 919936991c ipc: make all IPC input aggregates const; 2022-07-14 20:31:38 +00:00
Ryan Pavlik b08797a4a5 st/oxr: Fix missing return, resolve warnings 2022-07-14 14:17:35 +00:00
Ryan Pavlik 7e4c7d8407 c/client: Resolve warnings 2022-07-14 14:17:35 +00:00
Ryan Pavlik f69b6d6320 a/vk: Annotate some must-check-return functions 2022-07-14 14:17:35 +00:00
Ryan Pavlik b0405023b7 st/oxr: Resolve warning 2022-07-14 14:17:35 +00:00
Ryan Pavlik 593a277dd7 st/steamvr_drv: Resolve warnings 2022-07-14 14:17:35 +00:00
Ryan Pavlik 107f56b6d9 a/util: Resolve warnings 2022-07-14 14:17:35 +00:00
Ryan Pavlik 88389ae0ca a/math: Resolve warnings. 2022-07-14 14:17:35 +00:00
bjorn f703355761 c/main: rm unused wireframe setting; 2022-07-13 10:29:27 -07:00
Moses Turner fa2554f289 st/oxr: Don't use the debug gui by default in out-of-process 2022-07-12 16:18:17 +00:00
Mateo de Mayo f55ac05578 t/slam: Implement feature count metric UI and recording 2022-07-12 12:47:05 +00:00
Mateo de Mayo 789111daf8 u/var: Add u_var_curves 2022-07-12 12:47:05 +00:00
Mateo de Mayo 0324fbae6c u/var: Add u_var_curve
Let's you draw any arbitrary curve from a getter function.
2022-07-12 12:47:05 +00:00
Mateo de Mayo bf9e6fa370 u/var: Add u_var_ro_ftext 2022-07-12 12:47:05 +00:00
Mateo de Mayo db3fe110ba u/var: Auto width and match XYZ to RGB colors for ff_vec3 2022-07-12 12:47:05 +00:00
Mateo de Mayo c2009b6acc t/slam: Allow timing extension to be toggled on runtime 2022-07-12 12:47:05 +00:00
Mateo de Mayo 536001e2ad external/slam: Update header to 4.0.0
1. Add feature info pose extension
2. Make pose extensions toggleable on runtime
3. Add timestats helper for external system to keep track of info for pose extensions
2022-07-12 12:47:05 +00:00
Mateo de Mayo 49cd45b24e d/euroc: Fix typo 2022-07-12 12:47:05 +00:00
bjorn ce498e18ed a/vk: Relax compute-only queue family check;
This changes the search to prefer compute-only queues, but consider
compute-enabled queues as acceptable fallbacks.
2022-07-11 17:33:59 +00:00
Xaver Hugl 94407f6679 compositor/direct_wayland: don't warn about connector removals
The connector being withdrawn has no effect on active leases, printing a
warning is unnecessary.
2022-07-11 16:37:34 +02:00
Mateo de Mayo afa7f7ade9 u/vector: Add generic wrapper for std::vector 2022-07-07 15:35:04 +00:00
Ryan Pavlik f4cc2f3bf4 cmake: Fix some details of Clang on Windows. 2022-07-05 11:17:53 -05:00
bjorn 128ea42915 c/render: inline vk_command_buffer helper;
It's not really abstracting much anymore, and makes it more difficult to
see what's going on.
2022-07-01 22:01:32 +00:00
bjorn 4c09d20f80 c/render: render_resources has its own command pool;
Currently, there is a single command pool in the vk bundle, shared by
everyone.  Since command pools (and command buffers allocated from those
pools) can only be used on one thread at a time, this requires locking.
However, the main point of having these annoying command pool things in
the first place is that you can use one for each thread/lifetime/area in
the app and avoid the overhead of the locks (both computational and
cognitive).

In this change I have given the rendering bits of the compositor its own
command pool.  Instead of allocating and freeing a command buffer every
frame, a single command buffer is allocated from the pool during
initialization, and the pool is reset at the beginning of each frame.
Normally, multiple pools would need to be used, but this is not
necessary in monado because frames are serialized. The `TRANSIENT` and
`ONE_TIME_SUBMIT` flags have been added, which can allow for some driver
optimizations.  The render code no longer takes out the command pool
mutex.  The shared command pool is still there for a few remaining
places where vulkan work needs to be done outside the compositor.

I used the command buffer vulkan helpers when possible, but I would
maybe propose the idea of removing them, since they aren't really
wrapping much at this point.  The `C` macro helps a lot and it's a bit
easier to see the Vulkan details in front of you instead of needing to
switch back and forth between the helper.

Later, I think it would be cool to apply and document some constraints
like "the queue is only accessed in functions XYZ, the render_resources
command pool must only be accessed in layer_commit from 1 thread" etc.
2022-07-01 22:01:32 +00:00
bjorn 24c9dabfbb aux/vk: Add vkResetCommandPool; 2022-07-01 22:01:32 +00:00
Ryan Pavlik 0496ba9c5c aux/vk: Add additional include dirs conditionally. 2022-07-01 21:57:07 +00:00
bjorn a4e5a2d027 Support cubemap swapchains; 2022-07-01 12:23:53 -07:00
Moses Turner e552ef6bf3 t/common: Better error-checking in lighthouse builder 2022-06-30 15:20:46 +01:00
Moses Turner 567304374d d/v4l2: Factor out format setup so we can catch errors in stream_start 2022-06-30 15:19:51 +01:00
Jakob Bornecrantz 2cbad30823 u/pacing: Introduce a app pacing factory 2022-06-27 19:09:46 +01:00
Jakob Bornecrantz 6e2644dea7 u/pacing: Tidy comments 2022-06-27 19:09:46 +01:00
Jakob Bornecrantz 0fb155b886 c/multi: Include interface header 2022-06-27 19:09:46 +01:00
Jakob Bornecrantz 23aca9c0b9 c/multi: Document multi_system_compositor 2022-06-27 18:35:40 +01:00
Jakob Bornecrantz 202f37be63 t/common: Include config build for null compositor 2022-06-27 18:35:40 +01:00
utzcoz 34c97c48ef ipc,t/oxr_android: Add FLAG_IMMUTABLE for PendingIntent from S+
Signed-off-by: utzcoz <utzcoz@outlook.com>
2022-06-27 09:59:27 -05:00
Ryan Pavlik 62c87d27d6 android: Request new android.permission.HIGH_SAMPLING_RATE_SENSORS 2022-06-25 09:59:37 +08:00
Ryan Pavlik cec89ae751 targets: Update manifests for Android 12 2022-06-25 09:59:37 +08:00
Ryan Pavlik e1a0486f30 gradle: Update some deps slightly to cope with gradle 7 2022-06-25 09:59:37 +08:00
Ryan Pavlik 98f430f6f7 gradle: More dependency updates. 2022-06-25 09:59:37 +08:00
Moses Turner 4aaa61350b t/common: Add lighthouse builder 2022-06-24 01:58:51 +01:00
Moses Turner bd421e683c d/vive: Handle not-found devices correctly 2022-06-24 01:58:51 +01:00
Moses Turner 29cd525a3b d/vive: Prepare for lighthouse builder 2022-06-24 01:54:45 +01:00
Moses Turner 766f1b94e9 d/survive: Remove lots of cruft and prepare for Lighthouse builder 2022-06-24 01:54:45 +01:00
Moses Turner adadf6a2c2 t/common: Remove (sur)vive from legacy builder 2022-06-24 01:54:45 +01:00
Moses Turner 19958b4d77 d/ht: Remove cruft for Index 2022-06-24 01:54:45 +01:00
Moses Turner 00b6dd35ec d/survive: Don't create hand-tracker ourselves 2022-06-24 01:54:45 +01:00
Moses Turner a853022a66 d/vive: Don't create the hand-tracker ourselves 2022-06-24 01:54:45 +01:00
Moses Turner 6b63d473c6 t/common: Switch target_builder_legacy to u_system_devices_get_ht_device 2022-06-24 01:54:45 +01:00
Moses Turner a67d2fc28b a/util: Add u_system_devices_get_ht_device 2022-06-24 01:54:45 +01:00
Moses Turner 307e3ca1dc h/old_rgb: Fix regressions 2022-06-24 01:54:45 +01:00
Moses Turner 0e50364be6 d/ht: Don't drop algorithm_choice on the floor 2022-06-24 01:54:45 +01:00
Jakob Bornecrantz 218fbeae4e a/vk: Free "unused" AHardwareBuffer
It was only used for getting the format, free it until the function can
be completely rewritten to use it instead.
2022-06-21 20:47:04 +00:00
Jakob Bornecrantz 2c688a2d08 a/vk: Tidy return variable name 2022-06-21 20:47:04 +00:00
Jakob Bornecrantz 13504a29af a/vk: Return an error if ahardwarebuffer_image_allocate fails 2022-06-21 20:47:04 +00:00
Moses Turner 6f21741c51 xrt: Fixup - rename *all* of the relevant hand-tracking structs 2022-06-21 21:18:41 +01:00
Moses Turner 1718d01fb1 xrt: Rename some hand-tracking structs and document them better 2022-06-21 20:37:08 +01:00
Moses Turner 73dbc712ab h/mercury: Add Levenberg-Marquardt optimizer, and lots of fixes!
Co-authored-by: Charlton Rodda <charlton.rodda@collabora.com>
Co-authored-by: Ryan Pavlik <ryan.pavlik@collabora.com>
2022-06-20 16:33:48 +01:00
Moses Turner 8040224b39 xrt: add hand_tracking_image_boundary_info 2022-06-20 16:33:48 +01:00
Moses Turner db85ea2df5 external: Add tinyceres 2022-06-20 14:36:20 +01:00
Moses Turner 9651f66c4c a/util: Add clear() method to HistoryBuffer 2022-06-18 21:56:03 +01:00
Moses Turner 8729c0485e t/hand/async: Add simple pose-prediction 2022-06-18 21:51:09 +01:00
Moses Turner 543a436c99 m/relation_history: Add motion estimation 2022-06-18 21:50:14 +01:00
Mateo de Mayo 329b5c05bc d/wmr: Wait 3 seconds for Odyssey+ display 2022-06-18 14:19:01 -03:00
Mateo de Mayo ed7c148a00 d/wmr: Optionally average IMU samples for 3DoF tracker
Similar to how this was being done for SLAM.
It's significantly less jittery and still has a good response.
Smarter filters might benefit from raw measurements so the functionality can
be enabled again with a checkbox.
2022-06-18 14:19:01 -03:00
Mateo de Mayo 10e39d79b8 d/wmr: Use poses instead of isometries for T_imu_cam poses
Now that sensor poses are in WMR space, this is a bit tidier
than creating the 4x4 matrices.
2022-06-18 14:19:01 -03:00
Mateo de Mayo f98b71243c d/wmr: Correct hand tracking pose
Now the tracked hand appears roughly in the same spot as your real hand and
the tracking works a bit better.
2022-06-18 14:19:01 -03:00
Mateo de Mayo f390214f66 d/wmr: Correct SLAM-tracked IMU pose to middle of the eyes 2022-06-18 14:19:01 -03:00
Mateo de Mayo 008ba2433b d/wmr: Refactor how precomputed transforms work
Hopefully this is an improvement and not just a rewrite. Some ideas were:
1. Keep poses in WMR space as much as possible.
2. Add an explicit function that precomputes a handful of transforms that allow
   converting between WMR and OpenXR coordinates.
3. Make naming of variables in line with a relatively common T_A_B notation.
4. I wasn't able to figure out why `wmr_config_compute_pose` worked before,
   in any case, hopefully the new notation convention helps understanding
   why P_oxr_{acc,gyr} work.
2022-06-18 14:19:01 -03:00
Mateo de Mayo 326402da2a a/math: Use angle as magnitude of change in m_filter_euro_quat
Previously this was using math_quat_len which was always 1 for
these unit quaternions. This commit assumes math_quat_ln works properly which is
not exactly true at the moment and the returned angle will be twice as large.
2022-06-18 14:19:01 -03:00
Mateo de Mayo d773ab4cf2 a/math: Add pose interpolate function and others
- math_matrix_4x4_isometry_from_pose
- math_pose_from_isometry
- math_pose_interpolate
- m_vec3_equal
2022-06-18 14:19:01 -03:00
Jakob Bornecrantz cf152fe4cc st/prober: Free builders list 2022-06-17 15:48:44 +01:00
Moses Turner afec083047 d/ht: Don't depend directly on any external libraries; t/hand does that for us now 2022-06-16 15:51:55 +01:00
Moses Turner d7eece4cb5 h/mercury: Better naming 2022-06-15 17:34:41 +01:00
Moses Turner 8e3a47dd94 t/hand: Apply formatting 2022-06-15 17:34:41 +01:00
Ryan Pavlik d7d5af1972 t/ht: Fix include path for onnxruntime 2022-06-15 17:34:41 +01:00
jungjik lee d6cc662d11 st/oxr: support different handtracker
There is another handtracker type in spec.
And also we can support other jointCount handtracker.
So checking this default value is not necessary.
2022-06-14 14:00:30 +00:00
Moses Turner 10c72d4272 c/main: Explain why we force the blit texture to be evenly-sized (NFC) 2022-06-14 14:01:55 +01:00
Moses Turner 3cdc9bc6cb a/gst: Explain why we require evenly-sized frames (NFC) 2022-06-14 14:01:38 +01:00
Jakob Bornecrantz 4870c34485 c/util: Emulate sRGB formats with linear versions 2022-06-13 20:10:45 +01:00
Jakob Bornecrantz 022f23b26c c/client: Correctly check for sRGB format 2022-06-13 20:10:45 +01:00
Jakob Bornecrantz a0724d8ea7 a/vk: On Android create sRGB images as linear and use views to sample with gamma 2022-06-13 20:10:45 +01:00
Jakob Bornecrantz 6fc1e0cdce c/client: Split EGL creation functions into smaller helper functions 2022-06-13 18:24:49 +01:00
Jakob Bornecrantz 83d29cfdc7 c/client: Print error if we can not query client API type from context 2022-06-13 18:22:31 +01:00
Jakob Bornecrantz db2cec2916 c/client: Rename insert fence function to match other functions 2022-06-13 18:22:31 +01:00
Jakob Bornecrantz b56142942d c/client: Tidy and reorg flow in egl create function 2022-06-13 18:22:31 +01:00
Jakob Bornecrantz 40a62329d8 c/client: Add some sanity checking and debug print OpenGL information 2022-06-13 18:22:31 +01:00
Jakob Bornecrantz ef93c43b21 c/client: Restore context on unsupported API and better debug printing 2022-06-13 18:22:31 +01:00
Jakob Bornecrantz 1d4bf5dcd5 c/client: Log if a format conversion isn't supported 2022-06-13 18:22:31 +01:00
Jakob Bornecrantz 0cbb850462 c/util: Improve debug printing when importing swapchain 2022-06-13 18:22:31 +01:00
Jakob Bornecrantz dfa24a7829 c/main: On Android prefer RGBA over BGRA VkSwapchains
BGRA is only supported on 0.1% of devices according to GPUinfo.
2022-06-13 18:22:31 +01:00
Jakob Bornecrantz 0984cfe9e1 c/main: Print swapchain formats on debug 2022-06-12 11:09:36 +01:00
Jakob Bornecrantz ee23b6244c c/main: Use trace instead of debug for per frame message 2022-06-12 11:09:36 +01:00
Jakob Bornecrantz 53a936a720 c/main: Ask for VK_KHR_image_format_list optionally 2022-06-12 11:09:36 +01:00
Jakob Bornecrantz 0682407ec6 c/null: Ask for VK_KHR_image_format_list optionally 2022-06-12 11:09:36 +01:00
Jakob Bornecrantz c026de6307 st/oxr: Ask for VK_KHR_image_format_list optionally 2022-06-12 11:09:36 +01:00
Jakob Bornecrantz bff61bec4b a/vk: Create image with mutable format if a sRGB on Android 2022-06-12 11:09:36 +01:00
Jakob Bornecrantz 2b29e925ea a/vk: Add check for VK_KHR_image_format_list device extension 2022-06-12 11:09:36 +01:00
Jakob Bornecrantz 4150028cb1 a/vk: Add a lot more formats vk_format_string 2022-06-12 11:09:36 +01:00
Moses Turner 633439e439 c/main: Fix rounding math and ensure even image sizes for readback 2022-06-12 00:50:28 +01:00
Moses Turner 18678786b7 a/gst: Complain if the image size is not divisible by two 2022-06-12 00:45:00 +01:00
Moses Turner 50e3a3cfa1 st/gui: Use main profile when recording videos 2022-06-11 22:26:56 +01:00
Julian Petrov 32fd49d52b st/oxr: Implement XR_KHR_win32_convert_performance_counter_time 2022-06-09 14:48:27 -04:00
Julian Petrov 1debb2e015 u/time: Implement QPC related functions 2022-06-09 14:48:27 -04:00
Julian Petrov 3b1e34ee20 a/os: Add QPC helper for getting win32 ticks 2022-06-09 14:48:27 -04:00
Moses Turner 3e87f9831d comp/main: Prettify nvidia allowlist and add Odyssey+ 2022-06-09 01:09:06 +01:00
zhibinw 1972fd3758 a/android: Add a flag to enable AHardwareBuffer GPU sampled usage. 2022-06-08 13:02:52 +00:00
zhibinw d17f232940 ipc/android: Extend timeout duration 2022-06-08 12:52:55 +00:00
zhibinw 9616606a2b c/client: Add protected content flag when create EGL images 2022-06-08 19:31:36 +08:00
Mateo de Mayo 604815cb51 d/wmr: Fix pose correction from Basalt
There was a confusion about whether this was needed for some apps. It was.
2022-06-02 15:47:57 +00:00
Mateo de Mayo e7c3376612 a/math: Add disabled test to show problem with current quat_exp implementation 2022-06-02 15:47:57 +00:00
Mateo de Mayo 6bc551d004 t/slam: Prioritize SLAM_CONFIG over driver calibration if set 2022-06-02 15:47:57 +00:00
Christoph Haag e24ec3d431 st/gui: Use int input for remote driver port 2022-06-02 15:29:57 +02:00
Christoph Haag 77ee72d4eb d/remote: Rename r_hub_system_devices_destroy
r_hub_destroy() taking a parameter of type struct xrt_system_devices* was weird.
2022-06-02 15:29:10 +02:00
Jakob Bornecrantz 9932e75db6 d/remote: Tidy and comment 2022-06-01 16:50:19 +01:00
Jakob Bornecrantz 7990ca9208 d/remote: Print out name values on wrong input name 2022-06-01 16:50:19 +01:00
Jakob Bornecrantz 93d92ec6a7 d/remote: Use vive_bindings helper library 2022-06-01 16:50:19 +01:00
Jakob Bornecrantz 7f73a58045 d/remote: Expose a Index controller instead of simple controller 2022-06-01 16:50:19 +01:00
Jakob Bornecrantz 46305b77db d/remote: Properly shut down the run_thread 2022-06-01 16:50:19 +01:00
Jakob Bornecrantz 2b35699d85 d/remote: Use better logging helpers 2022-06-01 16:50:19 +01:00
Jakob Bornecrantz d0cc7e4082 d/remote: Use xrt_system_devices directly in the driver
And also make shutdown properly work.
2022-06-01 16:50:19 +01:00
Jakob Bornecrantz 64694a7e56 st/prober: Remove remote code in legacy path
Implemented by a builder instead
2022-06-01 16:50:19 +01:00
Jakob Bornecrantz 3c1576fc44 st/gui: Make it possible to pass in remote address from the command line 2022-06-01 16:50:19 +01:00
Jakob Bornecrantz b782478571 st/gui: Make it possible to enter address and port for remote 2022-06-01 16:50:19 +01:00
Campbell Suter 0f8da1900b a/math: Fix math_pose_invert breaking on rotated poses, and add a test
Previously, math_pose_invert would apply a multiplication in the wrong
order. This lead to the position of the 'original' pose being rotated.

This patch fixes that, and adds a unit test to check this case.
2022-06-01 16:44:03 +01:00
Campbell Suter bb414f7d39 d/qwerty: Fix the aim pose not being HMD-relative
Commit e41cc1eec3 added support for the XRT_INPUT_SIMPLE_AIM_POSE pose
input in the QWERTY driver. Unfortunately it didn't change the code that
identifies whether the pose for a controller or HMD is being read.

In the QWERTY driver, the hands are positioned relative to the HMD, so
if you move or rotate the HMD the hands stay in the same place
on-screen. Whether a pose lookup is multiplied by the HMD transform
depends on whether the pose being looked up is that of a controller.

Thus the aim pose would not be positioned relative to the HMD.
2022-06-01 12:52:17 +00:00
Campbell Suter 45703f0952 d/remote: Mark pose as invalid when deactivated
Previously the pose on the remote driver controllers would always have
the set pose and the valid-tracking flags set. Leaving the pose set
makes sense (you might want to track how your game behaves when a
controller looses tracking but still has a pose set, for example
tracking issues caused by occlusion) but it wasn't possible to test with
the pose marked as not being tracked.

Therefore this patch deactivates the tracking flags when the controller
is not marked as active.
2022-06-01 17:36:49 +12:00
Moses Turner 68d3e117d8 t/hand: Remove gstreamer dependency 2022-05-31 22:39:17 +01:00
Jakob Bornecrantz fc469e7d5f a/tracking: Document and fix cond var loop in psvr 2022-05-31 13:38:56 +00:00
Jakob Bornecrantz d2a2005212 a/tracking: Document and fix cond var loop in psmv 2022-05-31 13:38:56 +00:00
Jakob Bornecrantz b41addbbe7 t/hand: Document and fix cond var loop 2022-05-31 13:38:56 +00:00
Jakob Bornecrantz 2300e4fa57 c/main: Document cond var loop 2022-05-31 13:38:56 +00:00
Ryan Pavlik bbda2bac48 d/wmr: Add TODO at suspicious code. 2022-05-31 13:38:56 +00:00
Charlton Rodda aa31ac3789 st/oxr: Implement dpad emulation 2022-05-31 13:25:48 +00:00
Charlton Rodda 803d679e11 st/oxr: Add dpad bindings 2022-05-31 13:25:48 +00:00
Jakob Bornecrantz 59fc679152 st/oxr: Verify EXT_dpad_bindings structs 2022-05-31 13:25:48 +00:00
Jakob Bornecrantz fb0f94c900 st/oxr: Add dpad state and functions 2022-05-31 13:25:48 +00:00
Jakob Bornecrantz 9b27fb1a2e WIP: aux/binding: Add dpad_emulation support 2022-05-31 13:25:48 +00:00
Jakob Bornecrantz 90df723853 st/oxr: Check requirements for EXT_dpad_binding 2022-05-31 13:25:48 +00:00
Jakob Bornecrantz 6a54b4e6e3 st/oxr: Generate headers for XR_KHR_binding_modification 2022-05-31 13:25:48 +00:00
Jakob Bornecrantz 6296c9ded5 st/oxr: Generate headers for XR_EXT_dpad_binding 2022-05-31 13:25:48 +00:00
Jakob Bornecrantz 2715b0e144 aux/bindings: Fix a few pep8 errors 2022-05-31 13:25:48 +00:00
Jakob Bornecrantz a8c254a8cf aux/bindings: Refactor path verify function generation 2022-05-31 13:25:48 +00:00
Jakob Bornecrantz 037c49ce30 aux/bindings: Update generated file copyright 2022-05-31 13:25:48 +00:00
Alex 642b36c5ad depthai : added missing target 2022-05-30 18:21:14 -07:00
Jakob Bornecrantz 7e45fc7dd9 t/common: Integrate null compositor 2022-05-28 17:30:19 +00:00
Jakob Bornecrantz c976c54008 c/null: Add null compositor
Based on sample compositor code.

Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
Co-authored-by: Ryan Pavlik <ryan.pavlik@collabora.com>
2022-05-28 17:30:19 +00:00
Jakob Bornecrantz 8effde1d61 t/service: Do not depend directly on comp_main
Because target_instance does so already.
2022-05-28 17:30:19 +00:00
Jakob Bornecrantz 9ee54a44a7 ext/openxr: Update headers to 1.0.23 2022-05-28 11:44:04 +01:00
Jakob Bornecrantz fc769347a8 c/client: Better error logging when failing to make current context 2022-05-27 15:14:59 +00:00
Jakob Bornecrantz 7646fa64c8 st/oxr: Make sure to init session fields as early as possible
Noticed that on debug builds the mutex wasn't inited and the session
destroy function was called on failure to create the compositor.
2022-05-27 15:14:59 +00:00
Simon Zeni c8b4f7c64c c/client: implement EGL context begin and end 2022-05-27 15:08:40 +00:00
Simon Zeni f91ada32c2 ipc: add missing sys/types include 2022-05-27 15:08:40 +00:00
Mateo de Mayo 29aefe2ba8 misc: Use pretty printers and remove stale matrix print functions
Use u_pp_matrix_* instead.
2022-05-26 18:35:39 +00:00
Mateo de Mayo 7d80729358 u/pp: Add array and array2d f64 pretty printers 2022-05-26 18:35:39 +00:00
Mateo de Mayo 2785c6bcfa d/wmr: Wait until first IMU sample to send frames
In an Odyssey+, it seems that before the first IMU sample the frame timestamps
do not make sense and thus can make the SLAM system crash.

Also, this commit enables SLAM submission from start unless specified.
SLAM for WMR headsets now works "out of the box" :)
2022-05-26 18:35:39 +00:00
Mateo de Mayo 24be4b0a98 d/wmr: Send calibration to SLAM tracker
This makes it possible to use Basalt without having to create a calibration file
for the headset anymore.
2022-05-26 18:35:39 +00:00
Mateo de Mayo 8adbdc27e5 t/slam: Allow drivers to send calibration info to SLAM tracker
There were a couple of properties that didn't fit well in our current
calibration structs and so I created t_slam_calib_extras struct to store them.
2022-05-26 18:35:39 +00:00
Mateo de Mayo dad70ab7d0 external/slam: Improve cam_calibration feature struct 2022-05-26 18:35:39 +00:00
Mateo de Mayo 3bf07a2711 d/wmr: Load IMU calibration 2022-05-26 18:35:39 +00:00
Mateo de Mayo 02abc49313 t/calib: Add IMU intrinsics struct 2022-05-26 18:35:39 +00:00
Mateo de Mayo 05b8e320a5 a/math: Add multiple isometry-related matrix functions
An isometry is a rigid body transform. In this context I'm using the term to
refer to 4x4 homogeneous matrices in SE(3). I.e., matrices comprised of a
3x3 rotation, a 3x1 translation, and a [0,0,0,1] last row.
This matrix represent both rigid body transforms.
2022-05-26 18:35:39 +00:00
Mateo de Mayo 8b2fa955b9 a/math: Fix matrix identities and use isometry
Isometry3f is a 4x4 matrix transform that performs only rotation and translation
(an SE(3) matrix). Its inverse can be computed trivially by Eigen compared to a
regular 4x4 transform.
2022-05-26 18:35:39 +00:00
Mateo de Mayo 2212cf95cf a/math: Add missing extern C 2022-05-26 18:35:39 +00:00
Mateo de Mayo 9281cb1d16 misc: Silence unused warnings on release builds 2022-05-26 18:35:39 +00:00
bjorn d3a0f10acb c/client: rm client swapchain layout transition;
This was only there to satisfy a validation layer bug, which appears
to have since been fixed.  It doesn't make sense to transition an XR
swapchain image to PRESENT_SRC, and the client transitions from
UNDEFINED anyway when acquiring the image.

This also fixes a case where monado violates the OpenXR specification:

> The list of OpenXR functions where the OpenXR runtime may access the
> VkQueue are:
> - xrBeginFrame
> - xrEndFrame
> - xrAcquireSwapchainImage
> - xrReleaseSwapchainImage
> The runtime must not access the VkQueue in any OpenXR function that is
> not listed above or in an extension definition.
2022-05-26 17:39:02 +00:00
bjorn 2d954d84af c/render: Fix invalid synchronization when uploading images;
`queue_upload_for_first_level_and_layer` uploads pixels to an image.

It performs a layout transition, does the copy, and does another layout
transition.  There is an execution dependency between the the copy and
the second layout transition, but the memory dependency was missing.

Caught/tested via enabling synchronization validation.
2022-05-26 17:27:15 +00:00
Ryan Pavlik e5f6045b57 gradle: Be able to fetch Eigen if it's not found on the system. 2022-05-26 11:43:11 -05:00
Jakob Bornecrantz 9c44bc98fa c/multi: Document why unsetting waiting so late 2022-05-26 14:06:18 +00:00
Jakob Bornecrantz 1b7631bd54 c/multi: Also check if a semaphore or fence has been pushed in layer_begin
Closes #171
2022-05-26 14:06:18 +00:00
Jakob Bornecrantz 433915b0bf u/pp: Add math object printers 2022-05-26 14:10:06 +01:00
Moses Turner 5652ddd718 a/util: Fix function signature for u_builder_find_prober_device
Was this ever working?
2022-05-25 20:53:46 +00:00
Moses Turner bbd6475da0 mercury: Better warn if we get bad aspect ratio 2022-05-25 20:53:46 +00:00
Jakob Bornecrantz f404cc4c50 c/multi: Document flattened out producer/consumer construct 2022-05-25 21:42:58 +01:00
Jakob Bornecrantz 2afdb79895 c/multi: Document spurious wakeups 2022-05-25 21:42:58 +01:00
Jakob Bornecrantz 72dbed3ab5 c/multi: Make sure that wait thread has started in creation
Co-authored-by: Ryan Pavlik <ryan.pavlik@collabora.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2022-05-25 21:42:58 +01:00
Jakob Bornecrantz 3e9a5da3c6 c/multi: Ensure that only one thread waits for wait thread 2022-05-25 21:42:58 +01:00