Commit graph

4662 commits

Author SHA1 Message Date
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 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 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 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
Ryan Pavlik fd3a0a1435 c/multi: Fix condition var waiting for wait thread.
Spurious wakeups happen, have to actually have a condition
to check in a loop with the cond var wait.
2022-05-25 20:41:10 +00:00
bjorn d523001b6e aux/vk: Use correct image type for 3D images; 2022-05-25 20:24:17 +00:00
Ryan Pavlik e3874383d0 st/oxr: Fix one conformance issue with d3d11 2022-05-25 18:12:22 +00:00
Ryan Pavlik 2da547ce66 a/util: Update pretty printing of results 2022-05-25 18:12:22 +00:00
Ryan Pavlik 596d15a50c a/d3d: Further namespace the d3d11-specific functions 2022-05-25 18:12:22 +00:00
Ryan Pavlik 79dffbf3f6 st/oxr: Split out some code that is d3d-version independent 2022-05-25 18:12:22 +00:00
zhibinw 38b22f9b8e oxr:check EGL_NO_CONTEXT and return error 2022-05-25 22:59:16 +08:00
Aidan Thornton 2fdd01afdd d/android: initialize our thread and mutex 2022-05-25 12:30:21 +01:00
Ryan Pavlik 4a91eb3d84 c/client: Sync/waiting in D3D11
Co-Authored-By: Jakob Bornecrantz <jakob@collabora.com>
2022-05-24 16:55:45 -05:00
Ryan Pavlik 903fd01272 a/d3d: Add a fence waiting helper 2022-05-24 16:55:45 -05:00
Ryan Pavlik 3f777350e1 a/d3d: Fix docs for fence helper 2022-05-24 16:11:36 -05:00
Ryan Pavlik bb94363f94 a/d3d: Turn off some swapchain formats that we can't roundtrip properly 2022-05-24 16:11:36 -05:00
Ryan Pavlik 8ee10c5a6b xrt: Factor out deleters 2022-05-24 13:11:41 -05:00
Mateo de Mayo 2cf07dedf2 t/euroc: Fix crash when recording euroc dataset by providing UI button
Previously, a crash occurred in some situations when the second sample was
written before the first sample was able to create the necessary CSV files.
2022-05-23 17:51:11 -03:00
Moses Turner 6ef55d1f73 d/survive: Initialize threading primitive 2022-05-23 14:27:42 +00:00
Jakob Bornecrantz a4983fa5b1 auxiliary: Break apart CMakeLists.txt file 2022-05-23 09:12:54 -05:00
Jakob Bornecrantz 935de808c0 a/bindings: Do not depend on util 2022-05-23 09:12:54 -05:00
Jakob Bornecrantz 38eac9dddc xrt: Do not depend on util 2022-05-23 09:12:54 -05:00
Jakob Bornecrantz 037872e2b8 c/client: Include u_time.h in D3D11 compositor 2022-05-23 09:12:54 -05:00
Jakob Bornecrantz a75e00d25e d/qwerty: Include u_time.h in device file 2022-05-23 09:12:54 -05:00
Jakob Bornecrantz b64660d458 a/util: Include u_time.h in hand tracking helper 2022-05-23 09:12:54 -05:00
Jakob Bornecrantz 08d100d7b0 d/hydra: Depend on util 2022-05-23 09:12:54 -05:00
Ryan Pavlik 5656de8b72 a/d3d: Fence helpers 2022-05-23 14:11:43 +00:00
Jakob Bornecrantz 658a21a177 a/d3d: Tidy headers 2022-05-23 14:11:43 +00:00
Jakob Bornecrantz b8b42a4bcb c/client: Tidy D3D11 flip comments 2022-05-23 14:11:43 +00:00
Jakob Bornecrantz d91d6e2aa3 c/client: Do not flip projection layers in D3D11 2022-05-23 14:11:43 +00:00
Jakob Bornecrantz 0d055bb740 d/vive: Fix threading primitive initialization 2022-05-23 13:54:42 +00:00
Moses Turner 96d3896664 t/hand/mercury: Initialize the frame timing widget correctly 2022-05-23 13:19:58 +00:00
Moses Turner 9386e56c3d a/util: Paranoia for u_frame_times_widget 2022-05-23 13:19:58 +00:00
Mateo de Mayo bcac379cf5 ipc: Init connection mutex 2022-05-21 23:57:55 -03:00
Mateo de Mayo dd802f7fef c/main: Init vblank.even_thread 2022-05-21 23:50:19 -03:00
Mateo de Mayo 7a0a142dba misc: Fix some uninitialized mutexes 2022-05-21 23:31:18 -03:00
Jakob Bornecrantz 490e90b493 a/vk: Also check for d3d12 fence semaphores 2022-05-21 13:37:28 +01:00
Ryan Pavlik ea35e79ec7 ipc: Clarify that wait_image timeout is nanoseconds 2022-05-20 23:31:59 +01:00
Ryan Pavlik e54d336844 c/util: Clarify that wait_image timeout is nanoseconds 2022-05-20 23:31:59 +01:00
Ryan Pavlik 1b01eb808c c/mock: Clarify that wait_image timeout is nanoseconds 2022-05-20 23:31:59 +01:00
Ryan Pavlik 1cd435f321 c/client: Clarify that wait_image timeout is nanoseconds 2022-05-20 23:31:59 +01:00
Ryan Pavlik 753f37c41f xrt: Clarify that wait_image timeout is nanoseconds 2022-05-20 23:31:59 +01:00
Jakob Bornecrantz 4fa406610f a/os: Fix fallout from name change 2022-05-20 23:07:33 +01:00
Ryan Pavlik fcc18cf839 comp: Add a basic "mock" native compositor for testing purposes 2022-05-20 22:37:15 +01:00
Ryan Pavlik b6bb442162 st/oxr: Verify the LUID we get 2022-05-20 22:37:15 +01:00
Ryan Pavlik cdb8d54ca1 st/oxr: Work on D3D11 2022-05-20 22:37:15 +01:00
Ryan Pavlik 945603a8be comp/client: Initial D3D11 client compositor
Still missing image synchronization/waiting for completion.
2022-05-20 22:37:15 +01:00
Ryan Pavlik 9337ea375c auxiliary: Add new d3d helper library 2022-05-20 22:37:15 +01:00
Ryan Pavlik e6d58cf451 xrt: Add a D3D11 error 2022-05-20 22:37:15 +01:00
Ryan Pavlik bbfc06cc3e xrt: Add interfaces for D3D11 2022-05-20 22:37:15 +01:00
Ryan Pavlik 8bcc2cd195 xrt: Add D3D11 to the OpenXR include header 2022-05-20 22:37:15 +01:00
Ryan Pavlik 4dd1608950 st/oxr: Update extension support header for D3D11 2022-05-20 22:37:15 +01:00
Ryan Pavlik ccb58dbe8a build: Add option to support D3D11 2022-05-20 22:37:15 +01:00
Ryan Pavlik 907edf10a3 a/os: Add more docs for correct use of condition variables 2022-05-20 21:30:41 +00:00
Ryan Pavlik c7580c5242 c/main: Fix a condition var wait in windows win 2022-05-20 21:30:41 +00:00
Ryan Pavlik 5a81d1412a c/main: Fix Windows window backend to handle being shut down and started up again. 2022-05-20 21:30:41 +00:00
Ryan Pavlik 1fe1e8847e c/main: Get more data on our errors 2022-05-20 21:30:41 +00:00
Ryan Pavlik 795db8712b c/main: Be sure to clean up window class when done. 2022-05-20 21:30:41 +00:00
Ryan Pavlik 230424eec9 xrt: Add an XRT_INFINITE_DURATION define
Matches XR_INFINITE_DURATION
2022-05-20 21:30:41 +00:00
Ryan Pavlik 588b4831a2 a/util: Improve docs structure 2022-05-20 15:48:19 -05:00
Ryan Pavlik fd25fc75bc a/os: Rearrange time header to get the docs outside of the ifdefs.
Easier to read, easure to be sure we don't accidentally miss something
for doxygen.
2022-05-20 15:48:02 -05:00
Jakob Bornecrantz 875815b55b c/main: Init comp_base as early as possible 2022-05-20 19:06:14 +01:00
Ryan Pavlik ea4c14c3aa a/os: Rename os_thread_helper_stop to os_thread_helper_stop_and_wait 2022-05-20 18:46:37 +01:00
Ryan Pavlik 14aed90183 a/os: Add "initialized" flags to threading primitives (in debug builds)
Failling to init these (other than zero-init) works fine on Linux, but fails on Windows.
So now we at least have an assert on Linux.
2022-05-20 18:40:18 +01:00
Ryan Pavlik 1aba4348dc a/os: Fix naming convention for function pointer 2022-05-20 18:40:16 +01:00
Ryan Pavlik 4d9c3650cc c/multi: Unlock when multi system loop exits 2022-05-20 18:40:14 +01:00
Jakob Bornecrantz fee6809bc2 c/multi: Destroy threads instead of only stopping them 2022-05-20 18:40:11 +01:00
Christoph Haag aac68971c4 cmake: Fix service build with -DXRT_BUILD_DRIVER_QWERTY=OFF 2022-05-19 23:52:14 +00:00
Jakob Bornecrantz 6de4e4afaa u/worker: Init mutex and cond var 2022-05-19 23:13:48 +01:00
Mateo de Mayo 3e6fd9ba73 u/aeg: Fix clang warnings 2022-05-19 18:21:36 -03:00
Jakob Bornecrantz 03a6f079e0 t/common: Do not compile for builders when no driver is enabled 2022-05-19 15:51:06 +00:00
Jakob Bornecrantz 1c29b22cae st/oxr: Do not enable XR_EXT_debug_utils as it's not implemented yet 2022-05-19 14:32:06 +00:00
Mateo de Mayo 85bdbc1817 u/aeg: Implement state machine to correct overshooting and avoid oscillations 2022-05-19 14:03:17 +00:00
Mateo de Mayo bf311f3c2e u/aeg: Add log functions 2022-05-19 14:03:17 +00:00
Mateo de Mayo 63b477d250 a/math: Add MIN, MAX and CLAMP macros 2022-05-19 14:03:17 +00:00
Mateo de Mayo df5b5f40a9 d/wmr: Add auto exposure 2022-05-19 14:03:17 +00:00
Mateo de Mayo 77139b02a1 u/aeg: Add utility for automatic exposure and gain computation 2022-05-19 14:03:17 +00:00
Mateo de Mayo 7ea7cce930 u/var: Add u_var_histogram_f32 2022-05-19 14:03:17 +00:00
Mateo de Mayo 84422acd74 d/wmr: Centralize exposure and gain update logic
Also use the new draggable_u16 UI input for exposure.
2022-05-19 14:03:17 +00:00
Mateo de Mayo 7d266c76b5 u/var: Add u_var_draggable_u16 2022-05-19 14:03:17 +00:00
Ryan Pavlik e5b0840de3 t/common: Fix missing ifdef guard in target builder remote. 2022-05-18 10:37:04 -05:00
Ryan Pavlik fad9eb0e12 st/p: Fix mismatched prototype. 2022-05-18 10:36:49 -05:00
Arkadiusz Drohomirecki d444412221 a/math: Add a clear() method to RelationHistory/m_relation_history 2022-05-18 14:45:12 +00:00
Jakob Bornecrantz 4c6b3b4609 t/common: Fix instance get_prober function 2022-05-18 15:39:17 +01:00
Jakob Bornecrantz b68806956b st/oxr: Remove unused variable 2022-05-18 11:19:30 +01:00
Jakob Bornecrantz b180605ebe t/common: List the simulated device 2022-05-18 11:02:12 +01:00
Ryan Pavlik 4fb62a8d8f xrt: Word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 0c6f342db3 tracking/hand: Word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 54be3b958b targets: Word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 825ec9f549 t/oxr: Improve word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 894b5c955a st/steamvr_drv: Word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 2f2405fc1f st/prober: Improve word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik a25bb73921 st/oxr: Word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 26b522d1d2 st/gui: Improve word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 45263ea8de prober: word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 7f600569e7 ipc: Word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 6706180cd8 drivers: Improve word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik ba42730af3 compositor: Improve word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 25cb2e1790 c/render: Improve word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 973b8f3b7f c/main: Improve word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 0730f08f2d c/client: Improve word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 3b54152563 auxiliary: Improve word choice/clarity 2022-05-17 17:40:56 -05:00
Ryan Pavlik 6e78ec1127 a/util: Improve word choice/clarity 2022-05-17 17:39:52 -05:00
Ryan Pavlik 276f24c9ad a/tracking: Improve word choice/clarity 2022-05-17 17:39:52 -05:00
Ryan Pavlik 2a54dcdb19 a/math: Improve word choice/clarity 2022-05-17 17:39:52 -05:00
Ryan Pavlik 56a1c25378 d/simulated: Rename the simulated device driver. 2022-05-17 17:39:52 -05:00
Ryan Pavlik df413a3809 d/ht: Fix doxygen warnings 2022-05-17 14:42:02 -05:00
Ryan Pavlik 0e4f40c980 d/wmr: Fix doxygen warning 2022-05-17 14:42:02 -05:00
Ryan Pavlik d5bed66734 c/render: Docs improvements 2022-05-17 14:42:02 -05:00
Ryan Pavlik 7af6a78e54 c/client: doc and naming convention improvements 2022-05-17 14:42:02 -05:00
Ryan Pavlik 9edc6dd0bf a/util: Doc improvements 2022-05-17 14:42:02 -05:00
Ryan Pavlik cc8c034556 a/vk: Improve comment 2022-05-17 14:42:02 -05:00
Ryan Pavlik 507be96326 xrt: Improve docs, fixing doxygen warnings 2022-05-17 19:30:40 +00:00
Ryan Pavlik 6bd18ecb38 st/oxr: Clean up swapchain usage 2022-05-17 19:30:40 +00:00
Jakob Bornecrantz 61323c32d2 xrt: Use error messages in various instance and prober functions 2022-05-17 20:10:40 +01:00
Jakob Bornecrantz 58438db241 xrt: Add some error messages 2022-05-17 20:10:40 +01:00
Jakob Bornecrantz cf9c5b9dc7 u/var: Put in a namespace and add some documentation 2022-05-17 20:09:19 +01:00
Ryan Pavlik 8cb26df99d c/multi: Name some threads 2022-05-17 12:39:44 -05:00
Ryan Pavlik e33a9b3481 c/main: Name some threads 2022-05-17 12:39:44 -05:00
Ryan Pavlik e123a50438 comp/multi: Name the multi-system-compositor thread. 2022-05-17 12:39:44 -05:00
Ryan Pavlik 8bd7d199cb a/os: Improve docs in the threading header. 2022-05-17 12:39:44 -05:00
Ryan Pavlik 1e307e8e9f a/os: Add a function to set thread name. 2022-05-17 12:39:44 -05:00
Ryan Pavlik 147624348f a/vk: Add an internal check to ensure graphics buffer ref worked. 2022-05-17 17:38:07 +00:00
Jakob Bornecrantz 9285bee210 u/system_helpers: Use new xrt_prober_create_system function 2022-05-17 11:20:40 +01:00
Jakob Bornecrantz 3357cd4400 t/common: Add a few builders 2022-05-17 11:20:40 +01:00
Jakob Bornecrantz f91db16dac u/builders: Add xrt_builder_helpers 2022-05-17 11:20:40 +01:00
Jakob Bornecrantz 46c6412cc5 st/prober: Implement xrt_builder functionallity 2022-05-17 11:20:40 +01:00
Jakob Bornecrantz 850527adc5 xrt: Add system builders and update xrt_prober interface
Aka setter uppers.
2022-05-17 11:20:40 +01:00
Jakob Bornecrantz 82e2ce6390 st/oxr: Fix crash when there is no optional extension in the list 2022-05-16 21:18:23 +00:00
Frederic Plourde 2e42373d21 aux/os: Fix os_semaphore_get_realtime_clock()
Function was previously using output param 'ts' as
input for computing 'now' internally.
2022-05-16 20:56:53 +00:00
Moses Turner 8ac95a5177 d/ht: Add some things to the WMR creation interface, and make it the default interface. 2022-05-16 19:15:33 +01:00
Ryan Pavlik 2f457d0665 build: Search for DXGI and WinRT (WindowsApp) libraries 2022-05-16 11:00:27 -05:00
Ryan Pavlik 213f4b6003 a/util: Add a COM guard object.
Need COM initialized to do some things (like d3d11) on Windows,
don't know if the app already initialized it, don't have a big preference
for "how" we initialize it.
2022-05-16 11:00:27 -05:00
Ryan Pavlik 46a3c7b039 build: Look for WIL (Windows Implementation Library)
Also define XRT_HAVE_WIL if we have it.
2022-05-16 11:00:27 -05:00
Moses Turner bd0d24ad5c mercury: Hopefully fix 1DOF joint limiting 2022-05-16 16:09:32 +01:00
Moses Turner 0aadc85a79 mercury: Initialize variables
Caused heisencrashes sometimes.
2022-05-16 16:03:18 +01:00
Moses Turner 85f30f48c6 mercury: Correctly handle lower resolution input images
And better calibration debug prints
2022-05-16 16:03:18 +01:00
Jakob Bornecrantz 85d4a72d0f d/psmv: Fix NULL check 2022-05-15 21:40:26 +01:00
Jakob Bornecrantz 0201274764 c/render: Drop s from interface file for consistant naming 2022-05-15 18:04:45 +01:00
Jakob Bornecrantz f4ab51f78b u/pp: Add xrt_result_t printing 2022-05-15 15:02:08 +01:00
Jakob Bornecrantz 535cb839fa u/pp: Add stack only sink for printing messages 2022-05-15 14:54:00 +01:00
Jakob Bornecrantz 6a2426c0a2 d/psmv: Refactor device creation in preperation of builders 2022-05-15 14:45:01 +01:00
Jakob Bornecrantz ddb142564f d/psvr: Refactor device creation in preperation of builders 2022-05-15 14:45:01 +01:00
Jakob Bornecrantz 23ed0a6632 xrt: Remove unused xdev argument to trackers 2022-05-14 22:40:36 +01:00
Mateo de Mayo 4e20384f11 gui: Make imgui.ini file live in config directory 2022-05-14 16:46:20 -03:00
Moses Turner bcfd50c839 u/sink: Make sure gen-locked frames have the same timestamp 2022-05-13 14:18:02 +01:00
Jakob Bornecrantz 2e8d1f9b34 ipc: Set xdev_count on xrt_system_devices 2022-05-13 10:57:28 +01:00
Moses Turner 5122ecd0b0 d/dai: Fisheye calibration was upstreamed, actually use it now 2022-05-12 20:01:15 +00:00
Jakob Bornecrantz faca646193 u/logging: Change suffix to _func_t 2022-05-12 11:59:12 +00:00
Jakob Bornecrantz aeb11566cd xrt: Re-order things in xrt_prober 2022-05-12 11:59:12 +00:00
Jakob Bornecrantz 3a9ac6aa5d xrt: Move prober creation functions and struct last 2022-05-12 11:59:12 +00:00
Jakob Bornecrantz 116d1a9bf8 xrt: Typedefs have a _t suffix 2022-05-12 11:59:12 +00:00
Jakob Bornecrantz 126dbb540f xrt: Remove functions now living in helper code 2022-05-12 11:59:12 +00:00
Jakob Bornecrantz a38ea4231c d/vive: Use prober helper code 2022-05-12 11:59:12 +00:00
Jakob Bornecrantz b9d88f4eab d/wmr: Use prober helper code 2022-05-12 11:59:12 +00:00
Jakob Bornecrantz ceed09d9b5 u/prober: Add helper file for prober functions 2022-05-12 11:59:12 +00:00
Jakob Bornecrantz d76b1f5e9a st/prober: Remove last vestiges of hand tracking 2022-05-12 12:53:16 +01:00
Jakob Bornecrantz 1a358d3a92 u/sink: Remove unused downstream2 2022-05-12 12:53:14 +01:00
Jakob Bornecrantz fc093e2c7b u/sink: Assert on downstream being null 2022-05-12 12:53:12 +01:00
Jakob Bornecrantz add6cb639a st/gui: Fix crash if no instance have been created 2022-05-11 15:36:53 +01:00
Jakob Bornecrantz aafbaecbc9 xrt: Remove old unused instance functions 2022-05-11 10:49:15 +01:00
Moses Turner d6f62633e9 st/gui: Use xrt_system_devices struct and xrt_instance_create_system call
Includes fixes from Christoph Haag:

```
st/gui: Fix segfault when starting monado-gui without arguments
```

```
st/gui: Run gui_prober_select only in the modules that need a prober

This also speeds up starting up the monado-gui main menu.
```

Co-authored-by: Moses Turner <moses@collabora.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
2022-05-11 10:49:15 +01:00
Jakob Bornecrantz 65aa7581d2 st/ovrd: Use xrt_instance_create_system 2022-05-11 10:49:15 +01:00
Jakob Bornecrantz 3c6bf7b912 st/oxr: Use xrt_instance_create_system 2022-05-11 10:49:15 +01:00
Jakob Bornecrantz 634d495301 ipc: Use and support xrt_instance_create_system 2022-05-11 10:18:35 +01:00
Jakob Bornecrantz d642848bb1 t/cli: Use xrt_instance_create_system call 2022-05-11 10:16:08 +01:00
Jakob Bornecrantz 1b8cbfd226 t/common: Implement xrt_instance_create_system call 2022-05-11 10:15:18 +01:00
Jakob Bornecrantz d84819eee7 u/system_helpers: Add helper code for system devices 2022-05-11 10:14:00 +01:00
Jakob Bornecrantz 224b473dba xrt: Add xrt_instance_create_system call 2022-05-11 10:11:43 +01:00
Jakob Bornecrantz d0d3e0cac8 xrt: Add xrt_system_devices struct 2022-05-11 10:10:38 +01:00
Jakob Bornecrantz ccfe8c8de0 c/main: Fix doxygen ref 2022-05-11 10:08:03 +01:00
Moses Turner ec191bd9de targets: Add DepthAI head tracker 2022-05-10 23:47:30 +01:00
Moses Turner e8776fd705 d/dai: Add little xrt_device implementation for head tracking 2022-05-10 23:47:30 +01:00
Moses Turner c7cb763b38 inc/xrt, steamvr_drv: add DepthAI device type 2022-05-10 23:47:30 +01:00
Moses Turner 5ba7ae3c53 d/dai: Add initial IMU support 2022-05-10 23:47:30 +01:00
Moses Turner af5516f4b6 d/dai: We didn't need this calibration struct for anything 2022-05-10 23:47:30 +01:00
Moses Turner e25ee4058d xrt: Remove xrt_tracked_hand 2022-05-10 18:53:58 +01:00
Christoph Haag 71c7ec2382 c/main: Add thread waiting for vblank events
Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2022-05-10 11:22:51 +01:00
Jakob Bornecrantz e140cfad5c u/pacing: Add vblank timing function for display control 2022-05-10 11:22:04 +01:00
Jakob Bornecrantz 57070ad620 u/pacing: Make the comp time be at least 2ms in fake pacer 2022-05-10 11:18:52 +01:00
Jakob Bornecrantz b9b9ced43d u/pacing: Predict present time and then calculate display time in fake pacer 2022-05-10 11:18:52 +01:00
Jakob Bornecrantz 6c9c1e9249 u/pacing: Make present_to_display_offset_ns more clear 2022-05-10 11:18:51 +01:00
Jakob Bornecrantz e93b1c61ff st/oxr: Make VK_KHR_external_[fence|semaphore]_fd optional
Only for XR_KHR_vulkan_enable2, harder to do for XR_KHR_vulkan_enable.
2022-05-09 14:01:20 +00:00
Jakob Bornecrantz 8945153bc9 st/oxr: Work around clang-format (NFC) 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz c6b0089c51 xrt: Pass external_[fence|semaphore]_fd status in 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz 989c4334a3 c/client: Pass external_[fence|semaphore]_fd status in 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz c8de67ad94 c/main: Make VK_KHR_external_[fence|semaphore]_fd optional 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz cd018c98f8 c/main: Work around clang-format (NFC) 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz fd35f6668a c/util: Print device info as well 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz 2b042d48ff a/vk: Add function to print opened device info 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz 6c61965790 a/vk: Tidy vk_print_device_info 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz e092a3687b a/vk: Pass external_[fence|samaphore]_fd status to vk_init_from_given 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz 6a8e679f87 a/vk: Check for VK_KHR_external_fence_fd and VK_KHR_external_semaphore_fd 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz 308aeb8e21 a/vk: Sort checked extensions 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz 759162ebeb ipc: Return correct status if we fail to create a semaphore 2022-05-09 14:01:20 +00:00
Christoph Haag 2064fd8721 c/main: zero initialize xrt_system_compositor_info
Fixes valgrind warning

==354193== Thread 39:
==354193== Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised byte(s)
==354193==    at 0xC0A146D: sendmsg (in /usr/lib/libc.so.6)
==354193==    by 0x18527D: ipc_send (src/xrt/ipc/shared/ipc_utils.c:65)
==354193==    by 0x157771: ipc_dispatch (ipc_server_generated.c:165)
==354193==    by 0x15C88D: client_loop (src/xrt/ipc/server/ipc_server_per_client_thread.c:112)
==354193==    by 0x15C60C: ipc_server_client_thread (src/xrt/ipc/server/ipc_server_per_client_thread.c:183)
==354193==    by 0xC01A5C1: start_thread (in /usr/lib/libc.so.6)
==354193==    by 0xC09F583: clone (in /usr/lib/libc.so.6)
==354193==  Address 0xc0866afc is on thread 39's stack
==354193==  in frame #2, created by ipc_dispatch (ipc_server_generated.c:23)
==354193==  Uninitialised value was created by a stack allocation
==354193==    at 0x15F830: xrt_gfx_provider_create_system (src/xrt/compositor/main/comp_compositor.c:1118)
2022-05-09 15:53:25 +02:00
Christoph Haag f76b31795f ipc: zero initialize message buffer 2022-05-09 15:53:00 +02:00
Jakob Bornecrantz a24551b24b c/main: Refactor image count selection 2022-05-09 10:57:05 +00:00
Jakob Bornecrantz 9b8fe97ba9 c/main: Remove pre-declared function declarations
Split in two commits to improve git diff for previous commit.
2022-05-09 10:57:05 +00:00
Jakob Bornecrantz c052b856cf c/main: Refactor comp_target_swapchain to not pre-declare any internal functions 2022-05-09 10:57:05 +00:00
Jakob Bornecrantz 41cb0bc2e3 c/main: Whitespace in comp_target_swapchain 2022-05-09 10:57:05 +00:00
Jakob Bornecrantz 35e7a7c6ff c/main: Fix copy typo 2022-05-09 10:57:05 +00:00
Jakob Bornecrantz 6b19eedf9c d/survive: Use shared bindings 2022-05-09 10:46:44 +00:00
Jakob Bornecrantz 456f9c7f09 d/vive: Use shared bindings 2022-05-09 10:46:44 +00:00
Jakob Bornecrantz 56b77248c9 a/vive: Add bindings to touch controller 2022-05-09 10:46:44 +00:00
Jakob Bornecrantz 7d4b19766c a/vive: Add bindings 2022-05-09 10:46:44 +00:00
Jakob Bornecrantz 8cf120a6f2 c/render: Fix comment (NFC) 2022-05-08 10:09:07 +01:00
Jakob Bornecrantz d2f2a06e91 c/render: Use query pool to measure GPU time 2022-05-08 10:09:07 +01:00
Jakob Bornecrantz 6d02d67f78 c/main: Ask for VK_EXT_calibrated_timestamps if available 2022-05-08 10:09:07 +01:00
Jakob Bornecrantz c4f0e17e88 c/main: Setting logging level when checking vulkan caps 2022-05-08 10:09:07 +01:00
Christoph Haag 611a0f644d c/main: Use at least 3 vk images for comp target swapchain if supported 2022-05-08 10:09:07 +01:00
Mateo de Mayo 1a687cdee4 d/wmr: Add initial hand tracking for WMR devices
Co-authored-by: Moses Turner <moses@collabora.com>
2022-05-07 15:53:56 +00:00
Mateo de Mayo 7e1f9a7964 t/hand: Add option for allowing xfctx to be managed externally
Other trackers (e.g., psmv, slam, etc) work as sinks and the xfctx that manages
them is handled by the device providing the data streams. This change helps
the hand tracker have a more similar interface to other trackers.
2022-05-07 15:53:56 +00:00
Mateo de Mayo 44dac0eb5d d/wmr: Refactor UI and tracker initialization into their own methods (NFC) 2022-05-07 15:53:56 +00:00
Mateo de Mayo e3fadb5364 doc: Fix some doxygen warnings 2022-05-07 15:53:56 +00:00
Ryan Pavlik bcdc2416a7 cmake: Adjust deps of XRT_INSTALL_*_SYSTEMD_*
Value may be ignored in this repo without the service target,
but it's harmless to have it on, and more flexible to build on.
2022-05-06 14:30:49 -05:00
Ryan Pavlik ccbb658e49 st/oxr: Fix renderdoc build on Windows. 2022-05-06 13:59:24 -05:00
Ryan Pavlik e79a13f0ac a/util: Fix log corruption on Windows. 2022-05-06 00:26:39 +01:00
Ryan Pavlik dd6b0debd0 c/main: Populate LUID in xrt_system_compositor_info 2022-05-06 00:26:34 +01:00
Ryan Pavlik f958091578 st/oxr: Fix vulkan luid logging 2022-05-06 00:26:34 +01:00
Ryan Pavlik 3287c984aa cmake: Reorganize options, renaming some.
Rename XRT_HAVE_SLAM to XRT_FEATURE_SLAM,
moving it from xrt_config_have.h to xrt_config_build.h
accordingly.
2022-05-04 11:24:02 -05:00
Ryan Pavlik 097eeb4f29 cmake: Switch to a new way of setting options more in line with expectations.
If you explicitly request an option, and it's not available due to dependencies,
we now error out instead of silently changing the value.
2022-05-04 11:24:02 -05:00
Jakob Bornecrantz 38f68dc104 xrt: Use xrt_luid_t for deviceLUID 2022-05-04 15:11:24 +00:00
Jakob Bornecrantz b62d871498 xrt: Add xrt_luid_t 2022-05-04 15:11:24 +00:00
Jakob Bornecrantz 4ba23faa6b auxiliary: Deal with clang-format-14 fallout (NFC) 2022-05-04 15:58:01 +01:00
Jakob Bornecrantz 45ba6ff1b1 c/client: Add support for xrt_swapchain_create_properties 2022-05-04 15:51:34 +01:00
Jakob Bornecrantz a36620fad3 ipc: Use xrt_swapchain_create_properties when using XINA 2022-05-04 15:51:16 +01:00
Jakob Bornecrantz 6805b40ac2 ipc: Add support for xrt_swapchain_create_properties 2022-05-04 15:50:54 +01:00
Jakob Bornecrantz f78f334473 c/multi: Add support for xrt_swapchain_create_properties 2022-05-04 15:50:20 +01:00
Jakob Bornecrantz dd1da49aa5 c/base: Add support for xrt_swapchain_create_properties 2022-05-04 15:50:00 +01:00
Jakob Bornecrantz 07fe47d053 xrt: Add xrt_swapchain_create_properties and related function 2022-05-04 15:48:57 +01:00
Moses Turner a5024060eb d/dai: Autodetect OAK-D vs OAK-D Lite
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2022-05-04 13:43:43 +00:00
Ryan Pavlik 3f9e5c2a30 st/steamvr_drv: Guard GNU pragmas 2022-05-03 22:45:05 +01:00
Ryan Pavlik fedb4fd413 t/steamvr_drv: Adjust ifdef 2022-05-03 22:44:46 +01:00
Ryan Pavlik fc9fba9ab2 st/oxr: Adjust ifdef 2022-05-03 22:44:46 +01:00
Ryan Pavlik f9b4af04e4 a/tracking: Fix conversion warnings 2022-05-03 22:44:37 +01:00
Ryan Pavlik d8970f25f9 a/math: Fix conversion warnings 2022-05-03 22:44:28 +01:00
Ryan Pavlik 32a893fd2b st/oxr: Grab LUID from Vulkan if possible 2022-05-03 22:39:58 +01:00
Ryan Pavlik 49c45bf16a c/main: Store LUID 2022-05-03 22:34:47 +01:00
Ryan Pavlik 63fdadae3f c/util: Query GPU LUID when possible 2022-05-03 22:33:57 +01:00
Ryan Pavlik 3691d881fc xrt: Adjust includes for intrinsics on Windows/msvc 2022-05-03 22:33:57 +01:00
Ryan Pavlik 14f37dbe4c xrt: Add GPU LUID to xrt_system_compositor_info 2022-05-03 22:32:17 +01:00
Jakob Bornecrantz 96fbb1e59a c/client: Print the EGL return when failing to set context 2022-05-03 15:20:19 +00:00
Jakob Bornecrantz e791f3ea2f d/android: Fix various bugs 2022-05-03 14:22:34 +00:00
Ryan Pavlik 7a039543d1 st/prober: We want to support HID devices 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz dbb0461db4 st/prober: Tidy 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz d6dcba29ed st/oxr: Tidy 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 05d186083a st/gui: Fix conversion warnings 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz f8bce0b213 st/oxr: Fix conversion warnings 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 243c2e5326 d/psvr: Fix conversion warnings 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 2035ac03ff st/prober: Silence warnings 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz a98c589a30 c/client: Fix conversion warning 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 065c1c4ee2 c/render: Fix conversion warnings
c/render: Fix conversion warnings
2022-05-02 17:16:04 +01:00
Jakob Bornecrantz e39648bab1 c/multi: Fix conversion warnings 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 32d563d26c c/main: Fix conversion warnings
c/main: Fix conversion warnings
2022-05-02 17:16:04 +01:00
Jakob Bornecrantz d1d58c4bce u/distortion: Fix conversion warning 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz d8003b4c8f u/pacing: Fix conversion warning 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz fa988a7f74 u/time: Fix conversion warning 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 5981a508d2 u/sink: Fix conversion warnings 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 1afc18108e m/3dof: Fix conversion warning 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 0a0d4a49d5 m/space: Fix function call warning 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz d1512f0005 m/lowpass: Fix no define parameter warning 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 91facd10f1 xrt: Add xrt_uuid_t 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 428e46617a st/oxr: Avoid using sprintf 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 545ad5c1bf st/oxr: Avoid using strncpy 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz c6208482b8 c/util: Avoid using sprintf 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 6d2011abfd u/file: Avoid using fopen 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 42ba279050 u/file: Avoid using getenv 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz fbc51366e6 u/config: Avoid using strncpy 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 9ab5195337 st/oxr: Make sure defines are set for graphics integration files 2022-05-02 15:40:31 +00:00
Jakob Bornecrantz 5f421503e9 st/oxr: Set XR_USE_GRAPHICS_API_VULKAN as a compile define like the others 2022-05-02 15:40:31 +00:00
Jakob Bornecrantz d7613b9b67 st/oxr: Match comp client XLIB deps
Fixes #168
2022-05-02 15:40:31 +00:00
Jakob Bornecrantz f4c26bbabb st/oxr: oxr_session_gfx_gl.c to oxr_session_gfx_gl_xlib.c 2022-05-02 15:40:31 +00:00
Antonio Ospite bd06961188 a/util: Silence percetto warnings also when building with g++
Percetto is using designated struct initializers, but those are not
supported in standard C++ before C++20, resulting in some compilation
warnings.

The previous fix for that was using a diagnostic valid for clang but not
for g++ resulting in another warning when building with g++:

-----------------------------------------------------------------------
In file included from ../monado/src/xrt/auxiliary/math/m_relation_history.cpp:19:
../monado/src/xrt/auxiliary/util/u_trace_marker.h:21:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   21 | #pragma GCC diagnostic ignored "-Wc99-designator"
      |                                ^~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------

For GCC the diagnostics to disable is actually "-Wpedantic", as shown
below:

-----------------------------------------------------------------------
In file included from ../monado/src/xrt/auxiliary/util/u_trace_marker.h:25,
                 from ../monado/src/xrt/auxiliary/math/m_relation_history.cpp:19:
../external/percetto/src/percetto.h: In function ‘void percetto_event_with_args(percetto_category*, uint32_t, const char*, int32_t, const percetto_track*, int64_t, uint64_t)’:
../external/percetto/src/percetto.h:424:5: warning: C++ designated initializers only available with ‘-std=c++2a’ or ‘-std=gnu++2a’ [-Wpedantic]
  424 |     .track = track,
      |     ^
-----------------------------------------------------------------------

And for clang "-Wc++20-designator" should be slightly more accurate:

-----------------------------------------------------------------------
In file included from ../monado/src/xrt/auxiliary/util/u_trace_marker.h:29:
../external/percetto/src/percetto.h:424:5: warning: designated initializers are a C++20 extension [-Wc++20-designator]
    .track = track,
    ^
-----------------------------------------------------------------------

Fix all the warnings by ignoring the right diagnostics depending on the
compiler, taking care of differentiating clang++ from g++ as they both
define __GNUC__.
2022-05-02 17:31:11 +02:00
Jakob Bornecrantz 175ff58f10 build: Remove meson files 2022-04-28 21:36:25 +00:00
Jakob Bornecrantz bc89a23280 c/client: Use helper function to see if timeline semaphore is avaiable 2022-04-28 10:55:55 +01:00
Jakob Bornecrantz 0dbe9857c3 a/vk: Add function to check timeline semaphore import/export cap 2022-04-28 10:55:55 +01:00
Jakob Bornecrantz 3492c9e948 st/oxr: Tidy and print out suggested uuid in physical device selection code 2022-04-28 10:29:56 +01:00
Jakob Bornecrantz 8dfae6d1d1 st/oxr: Log information when creating VkInstance & VkDevice 2022-04-28 10:27:11 +01:00
Ryan Pavlik a10206dce6 a/vk: Fix MSVC build.
Apparently static initializers referring to other statics are not enjoyed
by Microsoft's compiler
2022-04-27 15:23:24 +00:00
Ryan Pavlik 7db9131aab a/util: Add pop_back to HistoryBuffer 2022-04-27 09:51:12 -05:00
nima01 232b3bade5 aux/math: More double-precision matrix and vector support 2022-04-25 19:14:46 +00:00
Jakob Bornecrantz 27e4577acb a/vk: Tidy calls to vk_get_memory_type 2022-04-24 22:47:51 +01:00
Jakob Bornecrantz 045fc9c33f a/vk: Add caller_name argument to vk_alloc_and_bind_image_memory for better debugging 2022-04-24 22:47:51 +01:00
Jakob Bornecrantz 917265d1b2 a/vk: Add vk_convert_timestamps_to_host_ns function 2022-04-24 22:47:51 +01:00
Jakob Bornecrantz f217046810 a/vk: Get the timestamp valid bits 2022-04-24 11:10:03 +01:00
Jakob Bornecrantz 599527fe01 a/vk: Fill in timestamp feature information 2022-04-24 11:10:03 +01:00
Jakob Bornecrantz 3aa4fdb096 a/vk: Add function to print device features 2022-04-24 11:10:03 +01:00
Jakob Bornecrantz f65a8b1eda a/vk: Add VK_EXT_calibrated_timestamps 2022-04-24 00:29:41 +01:00
Jakob Bornecrantz 9e58ab69e0 a/vk: Add VkQueryPool functions 2022-04-24 00:29:41 +01:00
Ryan Pavlik 2f78acd108 cmake: Copy some deps over when installing on Windows. 2022-04-21 17:17:16 -05:00
Ryan Pavlik 0926ce1dab cmake: Clean up how we install the runtime 2022-04-21 17:17:16 -05:00
Ryan Pavlik 86ee913086 cmake: Use new module for generating manifests
Remove the old parts.
2022-04-21 17:17:16 -05:00
Ryan Pavlik e75fae4d80 cmake: Fix where we install the runtime on Windows 2022-04-21 16:29:17 -05:00
Ryan Pavlik ad6b70267e cmake: Apparently Windows needs backslashes in the manifest files. 2022-04-21 16:23:49 -05:00
Ryan Pavlik aa4f43b049 cmake: Improve manifest installation, allowing relative paths to be generated. 2022-04-20 11:47:04 -05:00
Jakob Bornecrantz 3d35890206 u/pacing: Trace a little bit more to show when the app is late 2022-04-18 23:26:52 +00:00
Jakob Bornecrantz 4f5bcc5c22 u/pacing: Use the correct term for when the GPU work is done 2022-04-18 23:26:52 +00:00
Jakob Bornecrantz 93091157b8 u/pacing: Correct account for the apps full time when predicting 2022-04-18 23:26:52 +00:00
Jakob Bornecrantz c5fe86ccf9 u/trace_marker: Add env varible to enable/disable tracing
Should a application load and unload the OpenXR runtime driver multiple times
the Perfetto code becomes unstable and eventually crashes. This unfortunately
happens with the CTS, to avoid having to recompile Monado and a env variable
to control if tracing should be used.
2022-04-18 22:41:17 +00:00
Jakob Bornecrantz 7b82b63896 c/render: Remove unused timewarp shader 2022-04-18 18:48:54 +01:00
Jakob Bornecrantz 95d5343c9a c/render: Make distortion shader optionally do timewarp 2022-04-18 18:48:54 +01:00
Jakob Bornecrantz 0be36ccc9d c/render: Use shader specialisation to set distortion_texel_count 2022-04-18 18:48:54 +01:00
Jakob Bornecrantz 7ba7f43e83 a/vk: Add specialization_info argument to vk_create_compute_pipeline 2022-04-18 18:48:54 +01:00
Ryan Pavlik 2d916c11c5 xrt: Fix OpenXR platform include on Windows 2022-04-18 12:12:43 -05:00
Jakob Bornecrantz d24375f8ab st/oxr: Tidy order of extensions (NFC) 2022-04-18 17:39:28 +01:00
Ryan Pavlik 02435cc033 xrt: clarify comment 2022-04-18 10:54:22 -05:00
Ryan Pavlik 3ed593df4b st/oxr: Fix typo in comment 2022-04-18 10:53:09 -05:00
Ryan Pavlik 5dcb5c360c comp: Fix warnings on MSVC 2022-04-18 10:53:02 -05:00
Ryan Pavlik 3631289e4f xrt: Rename interface: reserved word in msvc. 2022-04-18 10:52:57 -05:00
Ryan Pavlik 11e0d7ed76 comp: Fix comment typo 2022-04-18 10:52:45 -05:00
Ryan Pavlik 1331e93bdc xrt: Fix typo 2022-04-18 10:52:42 -05:00
Jakob Bornecrantz 8ed5a082be c/render: Add missing comments to timewarp shader 2022-04-18 13:03:32 +01:00
Jakob Bornecrantz 1999891a19 c/render: Use a Vulkan projection matrix with Y down in projection space 2022-04-18 13:03:32 +01:00
Jakob Bornecrantz e561bec87d c/render: Use specialization constant for distortion size
This would allow Vulkan shader specialization to be used to change
the size and runtime instead of having to recompile.
2022-04-18 13:03:32 +01:00
Jakob Bornecrantz 87ea035416 c/render: Document compute distortion shader sampling code 2022-04-18 13:03:32 +01:00
Jakob Bornecrantz f4d3c8a93f c/render: Correctly calculate uv to tan angle offset values 2022-04-18 13:03:32 +01:00
Jakob Bornecrantz f20031ec99 c/render: Correctly convert shader index to target pixel uv 2022-04-18 13:03:32 +01:00
Jakob Bornecrantz ca33ac434c c/render: Correctly scale uv for compute distortion 2022-04-17 15:26:51 +00:00
Jakob Bornecrantz 3b6b45b762 d/wmr: Prettier xfer status printing 2022-04-17 16:06:11 +01:00
Christoph Haag 7ebd11e1d4 comp/render: Add VkExternalMemoryBufferCreateInfo
Fixes validation error when calling render_buffer_init_exportable

VUID-vkBindBufferMemory-memory-02726(ERROR / SPEC): msgNum: -168767885 - Validation Error: [ VUID-vkBindBufferMemory-memory-02726 ] Object 0: handle = 0xe88693000000000c, type = VK_OBJECT_TYPE_BUFFER; Object 1: handle = 0xcad092000000000d, type = VK_OBJECT_TYPE_DEVICE_MEMORY; | MessageID = 0xf5f0ce73 | vkBindBufferMemory(): The VkDeviceMemory (VkDeviceMemory 0xcad092000000000d[]) has an external handleType of VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT which does not include at least one handle from VkBuffer (VkBuffer 0xe88693000000000c[]) handleType Unhandled VkExternalMemoryHandleTypeFlagBits. The Vulkan spec states: If the value of VkExportMemoryAllocateInfo::handleTypes used to allocate memory is not 0, it must include at least one of the handles set in VkExternalMemoryBufferCreateInfo::handleTypes when buffer was created (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkBindBufferMemory-memory-02726)
    Objects: 2
        [0] 0xe88693000000000c, type: 9, name: NULL
        [1] 0xcad092000000000d, type: 8, name: NULL
2022-04-15 01:27:38 +02:00
Ryan Pavlik a55a5a54b3 a/math: Normalize argument order of one euro filter initializing functions. 2022-04-13 09:40:40 -05:00
Ryan Pavlik 3e6ec47296 monado: Apply clang-tidy fixes to most of the codebase.
All at least visually inspected, some revised from the auto-fixit
2022-04-13 09:34:54 -05:00
Nima01 f705683957 d/wmr: Partial decoding of device status message. Notifies when screen is fully powered up Reverb G1. 2022-04-13 00:19:50 +00:00
Ryan Pavlik 029fa2496e a/math: Tell clang-tidy to leave our MSVC-mandated define alone.
Also try to avoid redefinition warnings from MSVC.
2022-04-13 01:11:17 +01:00
Ryan Pavlik 0ae0316400 cmake: Format build files 2022-04-13 01:11:13 +01:00
Ryan Pavlik 4939bc2f59 a/util: Manual fixes to clang-tidy issues. 2022-04-13 01:10:54 +01:00
Ryan Pavlik f769ff8977 comp/main: Manual fixes to clang-tidy issues 2022-04-13 01:10:46 +01:00
Ryan Pavlik 55364cde35 xrt: Manual fixes to clang-tidy issues. 2022-04-13 01:10:14 +01:00
Alexander Koenig 5d76c83c37 Fix typo in rotate_lenses_right quirk, helps with #166 2022-04-12 23:14:32 +00:00
Ryan Pavlik 71580213aa comp/client: Fix doxygen warnings 2022-04-12 23:06:11 +00:00
Ryan Pavlik e551f6a9b8 t/hand/mercury: Fix some doxygen warnings. 2022-04-12 23:06:11 +00:00
Ryan Pavlik 62ff3bad54 t/cli: Fix warning when building without slam 2022-04-12 23:06:11 +00:00
Ryan Pavlik e8435da3e5 st/p: Silence an MSVC warning 2022-04-12 23:06:11 +00:00
Ryan Pavlik 91c94f015e st/oxr: Fix or silence a number of MSVC warnings 2022-04-12 23:06:11 +00:00
Ryan Pavlik ef9b15ee67 d/dummy: Silence some warnings 2022-04-12 23:06:11 +00:00
Ryan Pavlik b999b326dc comp/render: Silence warning 2022-04-12 23:06:11 +00:00
Ryan Pavlik fe7cf853e9 comp/render: Guard gcc pragmas 2022-04-12 23:06:11 +00:00
Ryan Pavlik ad1961fce7 auxiliary: Fix or disable a number of warnings
Both MSVC and doxygen warnings.
2022-04-12 23:06:11 +00:00
Ryan Pavlik 2b5f07c8e4 a/util: Silence warnings if using percetto in C++ 2022-04-12 14:38:58 -05:00
zhibinw 172ed2e847 xrt: Do not require OPENXR permission when connect MonadoService 2022-04-12 14:20:17 +00:00
Mateo de Mayo e41cc1eec3 d/qwerty: Fix warning for AIM pose 2022-04-12 10:20:02 -03:00
Jakob Bornecrantz 9fd8018a16 st/oxr: Improve space and view debug printing 2022-04-11 20:27:53 +01:00
Jakob Bornecrantz eb90745f4e st/oxr: Add pretty print functions 2022-04-11 20:27:53 +01:00
Jakob Bornecrantz 179664d6b6 st/oxr: Add pretty print integration in oxr_sink_logger 2022-04-11 20:27:53 +01:00
Jakob Bornecrantz 03df012e90 st/oxr: Add XRT_PRINTF_FORMAT to oxr_slog 2022-04-11 18:27:39 +01:00
Jakob Bornecrantz 58daee4752 st/oxr: Remove log argument to oxr_action_get_pose_input function 2022-04-11 18:27:39 +01:00
Jakob Bornecrantz e8fb10bd82 u/pretty: Add pretty print helpers 2022-04-11 18:27:39 +01:00
Jakob Bornecrantz cbeebe6ca4 xrt: Add XRT_GET_INPUT_ID 2022-04-09 22:07:06 +01:00
Jakob Bornecrantz b26a602322 c/main: Fix copy-typo 2022-04-08 20:15:00 +01:00
Jakob Bornecrantz 42df7b7b21 c/main: Lock cmd pool mutex when reading back frames 2022-04-08 19:30:06 +01:00
Jakob Bornecrantz 400c3900f0 c/render: Take the pool lock to fix threading errors 2022-04-08 19:20:33 +01:00
Jakob Bornecrantz 0ee1127431 aux/vk: Rename barrier functions and introduce new variant 2022-04-08 19:17:41 +01:00
Jakob Bornecrantz 9d74e7a8c5 aux/vk: Tidy command buffer related functions 2022-04-08 17:34:30 +00:00
Jakob Bornecrantz 6e13a0a21b aux/vk: Use correct aspect for image barrier 2022-04-08 17:34:30 +00:00
Jakob Bornecrantz 0d152381a8 c/client: Move NOOP begin/end to EGL client 2022-04-08 11:32:40 +01:00
Jakob Bornecrantz 46debec4fd c/client: Use begin and end in layer commit 2022-04-08 11:21:06 +01:00
Jakob Bornecrantz 7996457f3e c/client: Tidy 2022-04-08 11:21:06 +01:00
Christoph Haag cb7855b8bd c/client: Ensure the correct GL context is current
when running OpenGL functions.

Co-authored-by: James Hogan <james@albanarts.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2022-04-07 20:17:29 +02:00
James Hogan 7440e14fb4 aux/ogl: Add GLX API wrapper
Add a wrapper for the GLX API around the GLAD header.

Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
2022-04-07 02:21:34 +02:00
Christoph Haag 8dd19ea794 st/prober: Also disable autoprober drivers when qwerty is enabled 2022-04-06 23:23:55 +02:00
Christoph Haag 6b58c70f11 st/prober: remove stray ; 2022-04-06 23:23:52 +02:00
Mateo de Mayo 8468c8e0a6 t/cli: Add slambatch command 2022-04-06 11:50:17 -03:00
Mateo de Mayo 310248546d d/euroc: Add euroc runner 2022-04-06 11:50:17 -03:00
Mateo de Mayo 4c85e3fbb3 t/slam: Refactor tracker to accept a config struct on creation 2022-04-06 11:50:17 -03:00
Mateo de Mayo a80f88eb00 d/euroc: Refactor player to accept a config struct on creation 2022-04-06 11:50:17 -03:00
Mateo de Mayo ff8c2d820c d/euroc: Improve player tolerance to more datasets
Makes all usable euroc and tumvi datasets stream properly by fixing
some border cases that a couple of datasets had.
2022-04-06 11:50:17 -03:00
Mateo de Mayo 2a4a9aa210 t/slam: Add configuration options to tracker
Specifically:
- SLAM_PREDICTION_TYPE
- SLAM_CSV_PATH
2022-04-06 11:50:17 -03:00
Mateo de Mayo 7f0699dffc d/euroc: Add configuration options to the player
Specifically:
- EUROC_PLAY_FROM_START
- EUROC_USE_SOURCE_TS
- EUROC_PRINT_PROGRESS
- EUROC_MAX_SPEED
- EUROC_PLAYBACK_SPEED
2022-04-06 11:50:17 -03:00
Mateo de Mayo b6cd12a860 misc: Add gui nullcheck and initialize thread running field 2022-04-06 11:50:17 -03:00
Jakob Bornecrantz 716ba4db60 tracking: Predeclare struct instead of including cJSON in header 2022-04-06 15:38:44 +01:00
Jakob Bornecrantz d89b8f40d9 st/oxr: Detect VK_LAYER_MND_enable_timeline_semaphore
And enable timeline semaphore support if it is found.
2022-04-06 12:08:48 +01:00
Jakob Bornecrantz 1a00709186 aux/vk: Add vkEnumerateDeviceLayerProperties to instance functions 2022-04-06 11:45:24 +01:00
Campbell Suter e18ca850ba steamvr_drv: Use the correct grip name for XRT_DEVICE_SIMPLE_CONTROLLER
Previously, xrt_device_get_tracked_pose was called with
XRT_INPUT_GENERIC_HEAD_POSE when getting the pose of a SIMPLE_CONTROLLER device.

When using the 'remote' driver, this lead to two warnings per frame [1] and more
importantly the device pose wasn't being read. I haven't tested this with any
other drivers, but it appears that at least the QUERTY driver likely has an
issue with this too, as it uses the input name to determine whether to return
the HMD or controller pose.

[1] ERROR [r_device_get_tracked_pose] Unknown input name
2022-04-06 00:50:40 +00:00
Ryan Pavlik 16c016c4ca comp/render: Use a helper 2022-04-05 22:48:24 +00:00
Ryan Pavlik 8af498aa20 a/vk: Fix typo 2022-04-05 22:48:24 +00:00
Ryan Pavlik 7952773908 a/vk: Expose get_device_memory_handle as vk_get_native_handle_from_device_memory 2022-04-05 22:48:24 +00:00
Ryan Pavlik 9463de7e6f xrt: Undef Status and Bool in vulkan include if we think the xlib header got included. 2022-04-05 23:32:07 +01:00
Jakob Bornecrantz 48fd3e626c c/client: Tidy VK compositor 2022-04-05 23:22:26 +01:00
Jakob Bornecrantz 3bff3827d9 c/client: Remove acquire_release_fence completely
The barriers are a completely GPU affair no need to syncronize with the host.
2022-04-05 23:22:26 +01:00
Jakob Bornecrantz e7713bf1e4 c/multi: Be slightly smarter about late frames 2022-04-05 23:22:26 +01:00
Jakob Bornecrantz cf413a445f c/multi: Add per client thread that waits for sync objects 2022-04-05 23:22:26 +01:00
Jakob Bornecrantz 0595070132 u/pacing: Split draw into draw and wait, improve pipelining 2022-04-05 22:01:17 +00:00
Jakob Bornecrantz 47649f56b6 u/pacing: Track when the app wants the frame to be displayed 2022-04-05 22:01:17 +00:00
Jakob Bornecrantz 8e8a0b38c6 u/pacing: Add gpu done time tracking to app pacer 2022-04-05 22:01:17 +00:00
Jakob Bornecrantz 04b9602dd1 u/pacing: Allow more then two frames to be alive at the same time 2022-04-05 22:01:17 +00:00
Jakob Bornecrantz f4b75b3561 u/trace_marker: Add wait pacing track 2022-04-05 22:01:17 +00:00