Commit graph

4662 commits

Author SHA1 Message Date
Robbie Bridgewater 3802e737bb a/d3d,a/vk: Add R32_SFLOAT formats
Co-authored-by: Catalin Slobodeanu <cslobodeanu@magicleap.com>
2023-01-24 15:35:01 +00:00
SJakab e4a40a6e4e st/oxr: Skip oxr_session_end if connected to Unreal 4. 2023-01-24 11:42:46 +00:00
Moses Turner 4709ab85ca d/wmr: Fix grammar 2023-01-23 14:24:28 -06:00
Christoph Haag 87680c69d4 d/ohmd: Get rid of enum alias
The last enum index was used to determine the size of the inputs array.
The "clever" solution of aliasing enum values saved a minor amount of space
when allocating the xrt_device, while still allowing to dynamically assign
any input profile.

It also has drawbacks of being confusing and making it impossible to
validate that inputs from the correct xrt_input_name is requested.
Therefore just get rid of it, the minor space savings is not worth it.

fixes 2be4cbf4c3
2023-01-23 17:46:33 +01:00
Mario Kleiner 887b770f9e aux/binding: Implement optional "steamvr_controllertypes" for SteamVR input bindings
Add an optional switch -s or --steamvr to steamvr_profiles.py, which enables
a different naming scheme for the "controller_type" field in the generated
SteamVR profile json files.

If the switch is provided and an interaction profile in bindings.json
provides the optional new property "steamvr_controllertype", that property
will be used for the "controller_type" field of the written out .json,
instead of the regular auto-generated name.

This allows to generate json files which use controller_type names normally
used by SteamVR, so Monado provided controllers are mapped to the same
OpenXR interaction profiles that SteamVR would normally map them to.
E.g., the standard controller_type for Oculus touch controllers used by
SteamVR is "oculus_touch" instead of Monado's "monado_oculus_touch_controller".

That in turn allows OpenXR clients to use the SteamVR/OpenXR runtime to
access controllers provided by Monado's SteamVR driver plugin. Without such
compatible json files, only standard OpenVR clients can use controllers
exposed by Monado's SteamVR driver by default, but not OpenXR clients.

Tested with an Oculus Rift CV-1, and shown to now enable OpenXR clients
to make full use of the Oculus touch controllers.

The mappings for controllers other than Oculus Touch are derived from
SteamVR log output, but not actually tested due to lack of suitable hw.

Per discussion for the merge request, we enable this '-s' flag by
default in the make file for SteamVR style naming scheme.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2023-01-23 16:30:27 +00:00
Mario Kleiner d3893c229f aux/binding: Implement optional "steamvr_path" for SteamVR input bindings
When using the Monado SteamVR driver plugin together with an Oculus
Rift CV-1 and Oculus touch controllers, the grip / squeeze sensors
(e.g., /user/hand/left/input/squeeze/value) and the thumbsticks did not
work.

This because SteamVR expects those controls to be exposed under a
different path than what one would use for OpenXR, e.g.,
OpenXR /input/squeeze --> SteamVR /input/grip and
OpenXR /input/thumbstick --> SteamVR /input/joystick

The same is true for some other controller types.

To fix this, add some new code for input subpath substitution, to perform
this remapping, depending on binding type:

For type "trigger":  Substitute squeeze with grip
For type "joystick": Substitute thumbstick with joystick

For rare controller types where this would be the wrong thing to do,
e.g., Valve Index (for type "joystick", needs the path to remain
"thumbstick" as before), and for special cases not covered, we add
a new optional parameter 'steamvr_path' which can be used in bindings.json
to handle such mismatches in path flexibly to allow a dedicated path
name for SteamVR, overriding the regular "OpenXR style" input path or
auto-substituted path is if the parameter is omitted.

This makes the Oculus Rift CV-1 touch controllers fully work under SteamVR.

I haven't tested this with other controllers, as I only have Oculus
controllers for testing atm. But after reading about the HTC Vive controllers,
i did add a "steamvr_path" override for /input/menu -> /input/application_menu.
Cfe. https://github.com/ValveSoftware/openvr/wiki/IVRDriverInput-Overview

Also, a minor typo fix in steamvr_profiles.py as a bonus.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2023-01-23 16:30:27 +00:00
Mario Kleiner 50f7b5ba5f d/ohmd: Fix input from controls_mapping[0].
Use INPUT_INDICES_LAST instead of 0 for checking if control_mapping[i]
is unassigned for index i, ie. for skipping input.

As 0 is a valid mapping assignment defined in "enum input_indices", this
lead to dead input for SIMPLE_SELECT_CLICK and OCULUS_TOUCH_X_CLICK, both
assigned to 0.

This commit makes the Oculus Rift CV-1 left touch controllers X-Button
work in Monado OpenXR native and SteamVR via. Monado driver plugin.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2023-01-23 16:30:27 +00:00
Jakob Bornecrantz cb94bc2df0 t/common: Fix warning in lighthouse builder (NFC) 2023-01-23 13:42:20 +00:00
Christoph Haag 694baebd07 d/ohmd: Fix build
fixes 2be4cbf4c3
2023-01-22 22:04:47 +01:00
Christoph Haag 2be4cbf4c3 d/ohmd: Support generic trackers and clean up 2023-01-21 19:21:59 +00:00
Moses Turner dcbdcede5a a/util: Fix edge cases in Moses's distortion method
Before this, we read out of bounds at the bottom of the display. Unsure why nothing but Valgrind caught it.
2023-01-21 03:50:20 +00:00
Jarvis Huang 503dae2883 ipc/android: Early reject if server failed to start 2023-01-19 19:50:28 +00:00
Moses Turner 8d8b0d03b0 a/util: Constify u_box_iou's Box constructor 2023-01-17 23:46:46 -06:00
Moses Turner 1ef49b92f2 d/dai: Control floodlight brightness with an env var
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-01-15 09:54:54 -05:00
Jakob Bornecrantz 4643d4f089 st/gui: Add small hand-tracking demo scene 2023-01-14 20:11:49 -05:00
Christoph Haag 01dd02dc83 d/hdk: initialized thread helper
Fixes assert in debug mode.
2023-01-08 23:42:31 +01:00
Mateo de Mayo 6bd921b390 d/wmr: Fix unused corrected IMU timestamp 2023-01-02 16:21:08 -03:00
Jarvis Huang aa6b8cd88d ipc: Change init order to avoid assertion 2023-01-01 17:00:43 +00:00
Moses Turner cd163e366b c/main: Add another string for Reverb G2 to the nvidia direct mode allowlist 2022-12-31 03:11:41 -06:00
Moses Turner 946141ce40 h/mercury: Remove kine_ccdik optimizer
Goodbye, sweet prince.
This was my first attempt at the "optimizer" piece of our optical hand tracking, and it *did work* dammit! It just wasn't anywhere near as flexible or efficient as Levenberg-Marquardt.
It's worse in every way to the `kine_lm` optimizer, and getting hard to maintain, so we're getting rid of it. Gone, but never forgotten.
2022-12-29 20:03:05 +00:00
Jakob Bornecrantz 966878b1db t/sdl_test: Make sure to include inttypes.h for PRIu64 define 2022-12-21 00:49:06 +00:00
Jakob Bornecrantz 814170469a t/sdl_test: Include m_mathinclude to fix compile on Windows 2022-12-20 16:02:18 +00:00
Jakob Bornecrantz 1472bdf6b6 c/client: Create a share context instead of using context directly 2022-12-19 16:38:51 +00:00
Jakob Bornecrantz 0cf18ae044 c/client: Refactor context mutex locking to helper function 2022-12-19 16:38:51 +00:00
Jakob Bornecrantz b87239e7d8 d/wmr: Increase display init sleep and also add debug variable to control it 2022-12-14 12:20:10 +00:00
Malek 5c013bcecd a/math: Add stdbool include to m_lowpass_integer.h 2022-12-12 00:45:05 -08:00
Christoph Haag 2abcc17178 c/main: Add XRT_COMPOSITOR_DISABLE_DEFERRED env var 2022-12-09 16:38:06 +00:00
SeungHoon Han a594d6d86e a/android: fixed forced applied alpha=0.8 window after Android S 2022-12-08 21:41:16 +00:00
SeungHoon Han a2f5e5f1b9 a/android: hide display cutout to use full screen 2022-12-08 20:24:53 +00:00
Jakob Bornecrantz 040764c4f1 ipc: Trace around ipc_dispatch 2022-12-08 00:24:42 +00:00
Jakob Bornecrantz 50783a4c35 u/trace_marker: Add U_TRACE_[BEGIN|END] for greater control of zones/tracks 2022-12-08 00:24:42 +00:00
Jakob Bornecrantz f8d2c095ee u/trace_marker: Ensure ENABLE_TRACE is set before including Tracy headers 2022-12-08 00:24:42 +00:00
Jakob Bornecrantz 87f7b3426a t/sdl_test: Fix build on Windows 2022-12-08 00:24:42 +00:00
Jakob Bornecrantz a29a3c5ef3 c/mutli: Error log on failing semaphore wait 2022-12-06 15:26:40 +00:00
Jakob Bornecrantz ebb7c3cac2 d/wmr: Tidy prober code 2022-12-05 15:21:20 +00:00
zhibin wang 828dacc10b c/client: Fix eglDestroyImageKHR error and add AHB buffer release 2022-12-05 14:44:53 +00:00
Jakob Bornecrantz 9b3f9baff3 ipc: Properly cast assignment 2022-12-04 18:07:53 +00:00
Jakob Bornecrantz 6450cba854 ipc: Clarify code around xrt_comp_begin_session call 2022-12-04 18:07:53 +00:00
Jakob Bornecrantz bc83130354 ipc: Use correct cast 2022-12-04 18:07:53 +00:00
Jakob Bornecrantz 2ffaf7fd46 ipc: Add C++ guards to generated headers 2022-12-04 18:07:53 +00:00
Jakob Bornecrantz 09975b0d24 ipc: Use XRT_STRUCT_INIT 2022-12-04 18:07:53 +00:00
Jakob Bornecrantz 4a8448fcc3 c/multi: Clarify code around xrt_comp_layer_begin call 2022-12-04 18:07:53 +00:00
Jakob Bornecrantz 840febfb57 c/multi: Do not declare variable in switch statement 2022-12-04 18:07:53 +00:00
Jakob Bornecrantz f343bb709c c/multi: Use XRT_STRUCT_INIT 2022-12-04 18:07:53 +00:00
Jakob Bornecrantz f0021c359f xrt: Add XRT_STRUCT_INIT define
This helps with code that needs to be compiled with both C and C++.
2022-12-04 18:07:53 +00:00
Moses Turner 8c0735feec d/rift_s: Link to hand tracking driver if necessary 2022-12-04 18:05:02 +00:00
Mateo de Mayo dad7957fb2 a/math: Add clock_offset.h
For now it only has our simple exponential smoothing clock offset estimator.
But more advanced ones can go here too.
2022-12-02 16:10:09 +00:00
Bailey Morgan 35061c1d80 a/vk: Select graphics device based on prefered device type 2022-12-02 14:05:34 +00:00
Maxim Kizub e600cdaabf c/main,ipc/android: Deferred render target initialization for Android. 2022-11-30 09:32:18 -06:00
Maxim Kizub f6e1ea7aa9 t/oxr_android: fixed libmonado-service.so not found UnsatisfiedLinkError in inProcess build variant
Co-authored-by: SeungHoon Han <senicy.han@samsung.com>
2022-11-30 09:30:02 -06:00
Maxim Kizub 950f6cc506 a/android: Improve waiting for surface holder 2022-11-30 09:26:38 -06:00
Maxim Kizub 0ee891e7d6 c/main: Deferred render target initialization for windows 2022-11-30 09:25:43 -06:00
Jakob Bornecrantz f28f3a27e6 c/main: Fix crash on debug print 2022-11-30 13:31:36 +00:00
Moses Turner 85c0c78ac6 a/math: Fix m_vec3_angle function
Dot product is equivalent to a.length*b.length*cos(theta), not a.length_squared*b.length_squared*cos(theta)
2022-11-29 03:11:53 -06:00
Jakob Bornecrantz 69238be306 ext/openxr: Update XR_MNDX_force_feedback_curl 2022-11-26 14:26:58 +00:00
Jakob Bornecrantz 2a12f7d661 os/time: Use timePeriod[Begin|End] when sleeping in precise sleeper
One alternative to this is to use the CreateWaitableTimerExW function
with the CREATE_WAITABLE_TIMER_HIGH_RESOLUTION flag. On my systems the
function/flag was either as good or worse then timePeriod[Begin|End].
Setting the state globally or just just around the wait didn't seem to
have an impact on the precision.
2022-11-25 17:02:00 +00:00
Jakob Bornecrantz 96552a6caa t/common: Fix leak of calibration data in RGB-Tracker builder 2022-11-25 16:44:24 +00:00
Jakob Bornecrantz c195608602 a/tracing: Do more tracing in PSMV tracking code 2022-11-25 16:44:24 +00:00
Jakob Bornecrantz f552aacb87 a/tracking: Fix data waiting logic in PSMV tracking 2022-11-25 16:44:24 +00:00
Jakob Bornecrantz fb15e8aa50 ipc: Tidy Windows mainloop code 2022-11-25 16:04:20 +00:00
Jakob Bornecrantz 8271d213f5 ipc: Use u_winerror helper 2022-11-25 16:04:20 +00:00
Jakob Bornecrantz 6fc6968387 t/service: Try to raise priority and privilege on Windows 2022-11-25 16:04:20 +00:00
Jakob Bornecrantz 3b465b4241 u/windows: Add helper for trying priority or privilege from args 2022-11-25 16:04:20 +00:00
Jakob Bornecrantz 9e57a745b2 u/windows: Add function to raise CPU priority 2022-11-25 16:00:49 +00:00
Jakob Bornecrantz ef77cb08d0 u/windows: Add function to enable privileges on processes
Also add a small helper to add the privilege
SeIncreaseBasePriorityPrivilege, which is needed on
NVIDIA for HIGH and REALTIME priority Vulkan queues.
2022-11-25 15:54:45 +00:00
Jakob Bornecrantz 57820394f4 u/windows: Add files and u_winerror string format helper 2022-11-24 16:17:26 +00:00
Jakob Bornecrantz ad4c6a7215 u/pacing: More Tracy plots 2022-11-24 15:34:59 +00:00
Jakob Bornecrantz 8d817b773e st/prober: Print the deviecs we got when looping throught the builders 2022-11-24 12:08:17 +00:00
Jakob Bornecrantz d1db1dabfd u/pacing: Work around asserts on slow compositors
This isn't the most ideal solution but a proper fix will take longer.
2022-11-24 12:03:53 +00:00
Jakob Bornecrantz ad045fd271 t/sdl: Increase FPS 2022-11-24 12:03:53 +00:00
Jakob Bornecrantz 37da46b709 u/pacing: Add metrics output 2022-11-24 00:34:50 +00:00
Jakob Bornecrantz 87fdedeb68 u/pacing: Track more variables in app pacer 2022-11-24 00:34:50 +00:00
Jakob Bornecrantz f0cbb8a7aa t/service: Add metrics support 2022-11-24 00:34:50 +00:00
Jakob Bornecrantz 7fa20a8b46 u/metrics: Add functions to write a metrics file 2022-11-24 00:34:50 +00:00
Moses Turner f580271291 d/wmr: Guess camera orientation for Reverb G2 based on HT0 twist value 2022-11-23 13:02:35 -06:00
Moses Turner f5d4d49607 a/math: Add math_quat_to_swing_twist 2022-11-23 13:02:35 -06:00
Moses Turner b3c277196e a/math: Add faster (and correct!) math_quat_from_swing_twist 2022-11-23 13:02:35 -06:00
Moses Turner 9af195fea3 h/mercury: Add faster SwingTwistToQuaternion 2022-11-23 13:02:35 -06:00
Moses Turner e06dc0dda1 a/math: Correct documentation for math_quat_ln and math_quat_exp 2022-11-23 13:02:35 -06:00
Jakob Bornecrantz 6fe06068e8 c/main: Make XCB window deferred 2022-11-23 16:03:15 +00:00
Jakob Bornecrantz 3e1760fd04 c/main: Introduce comp_target_factory 2022-11-23 16:03:15 +00:00
Jakob Bornecrantz 93fdf0bd74 a/vk: Expose vk_select_physical_device function 2022-11-23 14:53:26 +00:00
Jakob Bornecrantz d8eb6865da c/render: Don't include comp_compositor.h 2022-11-23 14:53:26 +00:00
Maxim Kizub f5a06f9c46 c/main: Add code to defer render target initialization 2022-11-23 14:44:51 +00:00
Jakob Bornecrantz 8efb55403c d/psvr: Switch to reading sensors from its own thread
Tested-by: number-g <g@imagination.eu.org>
2022-11-22 17:58:07 +00:00
Jakob Bornecrantz 58596a5830 u/pacing: Add Tracy plots 2022-11-21 16:46:12 +00:00
Jakob Bornecrantz 7bc145d184 cmake: Add XRT_HAVE_TRACY variable 2022-11-21 16:46:12 +00:00
Jakob Bornecrantz 65e76e1277 u/trace_marker: Tracy support 2022-11-21 16:46:12 +00:00
Jakob Bornecrantz b1b63a9397 d/vive: Do more tracing during packet handling 2022-11-21 13:47:58 +00:00
Jakob Bornecrantz 60099fdd71 t/common: Do more tracing during init and fini 2022-11-20 14:36:37 +00:00
Jakob Bornecrantz 8637617833 c/main: Do more tracing during init 2022-11-20 14:36:37 +00:00
Jakob Bornecrantz 44599a7de7 c/main: Use U_TRACE_SET_THREAD_NAME 2022-11-20 14:36:37 +00:00
Jakob Bornecrantz 432bf03981 c/multi: Use U_TRACE_SET_THREAD_NAME 2022-11-20 14:36:37 +00:00
Jakob Bornecrantz 3a2dfd850c t/hand: Use U_TRACE_SET_THREAD_NAME 2022-11-20 14:36:37 +00:00
Jakob Bornecrantz c9bbeac70a d/v4l2: Use U_TRACE_SET_THREAD_NAME 2022-11-20 14:36:37 +00:00
Jakob Bornecrantz 36d1734377 d/vive: Use U_TRACE_SET_THREAD_NAME 2022-11-20 14:36:37 +00:00
Jakob Bornecrantz 5142fa7e88 d/psmv: Use U_TRACE_SET_THREAD_NAME 2022-11-20 14:36:37 +00:00
Jakob Bornecrantz 0691ed9b89 d/wmr: Use U_TRACE_SET_THREAD_NAME 2022-11-20 14:36:37 +00:00
Jakob Bornecrantz 386aa510bd ipc: Use U_TRACE_SET_THREAD_NAME 2022-11-20 13:52:38 +00:00
Jakob Bornecrantz d48de0d832 u/worker: Use U_TRACE_SET_THREAD_NAME 2022-11-20 13:52:38 +00:00
Jakob Bornecrantz 8b0e7675e4 u/sink: Use U_TRACE_SET_THREAD_NAME 2022-11-20 13:52:38 +00:00
Jakob Bornecrantz b49dc593b8 u/pacing: Use U_TRACE_PERFETTO define 2022-11-20 13:52:37 +00:00
Jakob Bornecrantz 469a79493c u/trace_marker: Add U_TRACE_SET_THREAD_NAME 2022-11-20 11:24:27 +00:00
Jakob Bornecrantz d1e116cb58 u/trace_marker: Check for both tracing and percetto 2022-11-20 00:31:24 +00:00
Jakob Bornecrantz f4a5e599ef u/trace_marker: Add convenience U_TRACE_PERCETTO define 2022-11-20 00:31:24 +00:00
Jakob Bornecrantz 648f91d35c u/trace_marker: Refactor define names and split idents from func 2022-11-19 17:38:48 +00:00
Jakob Bornecrantz 4ee8aa4054 u/trace_marker: Reorg file (NFC) 2022-11-19 17:38:48 +00:00
Jakob Bornecrantz 7d2bd5b3e0 u/trace_marker: Fix copy paste error (NFC)
Define was unused till now.
2022-11-19 17:38:48 +00:00
Simon Zeni 9293c628d7 a/vk: add VK_FENCE_IMPORT_TEMPORARY_BIT to vk_create_fence_sync_from_native 2022-11-18 16:43:07 -05:00
Simon Zeni 278aa4cd41 c/main: use swapchain semaphores for peek window rendering 2022-11-18 11:14:41 -05:00
Jakob Bornecrantz 98b7f7d1c6 xrt: Remove xrt_gfx_native 2022-11-15 23:24:20 +00:00
Jakob Bornecrantz 8d6b794878 c/main: Add own interface for creating the main compositor 2022-11-15 23:24:20 +00:00
Moses Turner cb2c355ba6 t/hand: fix 90 degree rotation for hand detection 2022-11-15 01:58:41 +00:00
Moses Turner a9d04045e6 c/main: Add Reverb G2's display to nvidia direct allowlist 2022-11-14 19:50:03 -06:00
Jakob Bornecrantz 89aee1892b d/remote: Update protocol to allow per view data 2022-11-14 16:07:15 +00:00
Patrick Nicolas a8dc902468 a/vk Add extentions for DMA-buf 2022-11-13 22:56:06 +00:00
Ryan Pavlik 58e4cb6e15 st/steamvr: can not -> cannot 2022-11-09 14:52:03 -06:00
Ryan Pavlik eac703a106 st/prober: can not -> cannot 2022-11-09 14:52:03 -06:00
Ryan Pavlik aa01868d0f xrt: can not -> cannot (comments) 2022-11-09 14:52:03 -06:00
Ryan Pavlik 678b27145a ipc/client: can not -> cannot 2022-11-09 14:52:03 -06:00
Ryan Pavlik 11bdba7e64 drivers: can not -> cannot 2022-11-09 14:52:03 -06:00
Ryan Pavlik 73f48d12ec comp/util: can not -> cannot 2022-11-09 14:51:58 -06:00
Ryan Pavlik 2eb259f26a aux: can not -> cannot 2022-11-09 14:48:38 -06:00
Ryan Pavlik 724b2288f9 st/oxr: can not -> cannot 2022-11-09 14:48:17 -06:00
Ryan Pavlik 1fb6270194 a/util: Resolve a bothersome clang-tidy complaint in iterators. 2022-11-09 08:26:16 -05:00
Ryan Pavlik 290fafa4f7 a/util: Fix missing pragma once 2022-11-09 08:26:16 -05:00
Ryan Pavlik a072af398c t/hand: Fix doxygen warnings 2022-11-09 03:47:44 +00:00
Moses Turner 00bf669e61 t/common: Disable SLAM by default for Valve Index 2022-11-08 12:32:23 -06:00
Mateo de Mayo 77f8972f36 d/vive: Add hardcoded quaternions for SLAM extrinsics
These come from my own calibration and are hopefully better than the wrong ones
reported by the factory data.
2022-11-08 12:02:34 -06:00
Mateo de Mayo c3757792d7 d/vive: Generate SLAM calibration automatically from factory data
Use factory data for SLAM calibration. Sensor rotations are off in most calib
files we saw (or at least we can't figure something better) so this won't work
very well. It's still necessary to properly calibrate the headset for good
results but at least now something works without that step.
2022-11-08 17:41:43 +00:00
Mateo de Mayo 0ebc7e042f d/vive: Improve readability of precompute_sensor_transforms (NFC) 2022-11-08 17:41:43 +00:00
Jakob Bornecrantz ca83275671 ipc: Move struct declaration into same place 2022-11-07 23:48:59 +00:00
Jakob Bornecrantz f9cd474156 ipc: Use XRT_MAX_IPC_HANDLES and also validate input from client 2022-11-07 23:48:59 +00:00
Jakob Bornecrantz 26c4771bfb ipc: Make _sync struct have the right indentation 2022-11-07 23:48:59 +00:00
Jakob Bornecrantz 86a6b4b3e3 ipc: Generated code doesn't need to care about line length 2022-11-07 23:48:59 +00:00
Jakob Bornecrantz 8601499a5a xrt: Add XRT_MAX_IPC_HANDLES 2022-11-07 23:48:59 +00:00
Jakob Bornecrantz 736f1fd671 c/util: Slightly improve device and queue creation 2022-11-04 10:46:42 +00:00
Jakob Bornecrantz 3f3e19299f c/null: Use VK_KHR_global_priority if available 2022-11-04 10:46:42 +00:00
Jakob Bornecrantz 04f930d99a c/main: Use VK_KHR_global_priority if available 2022-11-04 10:46:42 +00:00
Jakob Bornecrantz 1253d58717 t/sdl: Use VK_KHR_global_priority if available 2022-11-04 10:46:42 +00:00
Jakob Bornecrantz 6ba07d564c a/vk: If global priority is not available, only allow medium queues 2022-11-04 10:46:42 +00:00
Jakob Bornecrantz 379bf36860 a/vk: Also try to use VK_KHR_global_priority when creating device 2022-11-04 10:46:42 +00:00
Jakob Bornecrantz b6803b4bf8 a/vk: Add VK_KHR_global_priority 2022-11-04 10:46:42 +00:00
Mateo de Mayo 9d6c29397f misc: Fix multiple compile warnings in gcc and clang 2022-11-03 20:08:52 +00:00
Jakob Bornecrantz 45937312bd a/vk: Print out error on too many images to allocate 2022-11-03 17:43:06 +00:00
Jakob Bornecrantz a41ccb0467 a/vk: Use xrt limits for number of collection images max 2022-11-03 17:43:06 +00:00
Jakob Bornecrantz 04ab47ef3b st/oxr: Use xrt limits for number of swapchain images max 2022-11-03 17:43:06 +00:00
Jakob Bornecrantz cf2dbb9334 ipc: Use xrt limits for number of swapchain handles max 2022-11-03 17:43:06 +00:00
Jakob Bornecrantz 589a898c74 xrt: Start collection of limits in one place 2022-11-03 17:43:06 +00:00
Moses Turner f41596f176 h/mercury: Replace old detection model, and discard overlapping hands 2022-11-03 16:46:33 +00:00
Moses Turner b8a586175d a/util: Add header for box intersection over union 2022-11-03 16:46:33 +00:00
Mateo de Mayo 8f14c572ee d/vive: Apply IMU pose correction for SLAM tracking
The offset between IMU and middle-of-eyes for the Index is quite noticeable and
tracking felt very off before this.
2022-11-03 13:08:02 +00:00
Gustavo Alvarez 21788f8650 t/cli: Link with aux_os_ble
Fixes build on certain configurations.
2022-11-03 10:03:25 +00:00
Moses Turner 0cd2f4f081 h/mercury: Fix data home 2022-11-02 22:35:27 +00:00
Moses Turner 32da562bc5 h/mercury: Remove really old keypoint estimator and NCNN stuff 2022-11-02 22:35:27 +00:00
Jakob Bornecrantz ede2292690 d/psvr: Paranoia 2022-11-02 17:55:58 +00:00
Jakob Bornecrantz 200bbc9da0 d/psvr: Protect sensore reads with device_mutex
Fixes asserts by the fusion code where samples where pushed in the wrong
order to the fusion code.
2022-11-02 17:55:58 +00:00
Jakob Bornecrantz fdac0b5137 d/psvr: Make sure to init the device_mutex before teardown can be called 2022-11-02 17:55:58 +00:00
Jakob Bornecrantz c4a734e546 a/tracking: Do not push empty frames to debug sink 2022-11-02 17:55:58 +00:00
Jakob Bornecrantz 0f17fa0f5f a/tracking: Fix data waiting logic in PSVR tracking 2022-11-02 17:55:58 +00:00
Jakob Bornecrantz f32eb0d662 c/main: Refactor comp_renderer init/fini slightly 2022-11-02 15:24:26 +00:00
Jakob Bornecrantz f6d7bfbe0a c/main: Init render shaders and resources earlier 2022-11-02 15:24:26 +00:00
Jakob Bornecrantz e76b382bc9 c/main: Destroy target before render resources 2022-11-02 15:24:26 +00:00
Jakob Bornecrantz f6fb9f715e c/main: Reorder fields to make dependency slightly clearer (NFC) 2022-11-02 15:24:26 +00:00
Jakob Bornecrantz 7b1c18255a u/pacing: Work around issues with frame reuse
The code creates a frame with the timing information, and keeps track of the
times the applications does various things during the frame loop. Like
starting to render and finished rendering and so on. It keeps track of that
frame until it has determined that the application or the system compositor
will never do anything thing with that frame.

Now the allocation side of thing is very simple, just a long array of
FRAME_COUNT size that is reused with frame_id % FRAME_COUNT. So if the
application or the compositor keeps a frame along for too long it will try to
reuse that frame. The code has asserts to catch this. Making FRAME_COUNT makes
that re-use more unlikely.
2022-11-02 00:22:19 +00:00
Jakob Bornecrantz a5f10e7aa2 c/multi: Rework logging with session transition a bit 2022-11-02 00:21:31 +00:00
Jakob Bornecrantz 01d195808d st/oxr: Use snprintf to safely write strings to app 2022-10-31 12:12:35 +00:00
Jakob Bornecrantz 51730d2db1 a/vk: Improve the VkResult to string printing (NFC) 2022-10-30 20:17:09 +00:00
Mateo de Mayo bf66a9595c build: Fix undefined reference to u_sink_create_queue
When XRT_FEATURE_SLAM is on, t_euroc_recorder.cpp is linked.
This depends on u_sink_queue.c.
2022-10-30 11:34:57 -03:00
Boris-Chengbiao Zhou cd2f204414 st/oxr: Check if user has already enabled timeline semaphores
We aren't allowed to add a second struct of the same type to the pNext
chain during Vulkan device creation.
2022-10-28 23:19:50 +02:00
Jakob Bornecrantz 35b941812a c/client: Merge have EGL conditional file adding 2022-10-27 17:19:57 +00:00
Jakob Bornecrantz f9c6c0d016 a/ogl: Only link to EGL on Android 2022-10-27 17:19:57 +00:00
Jakob Bornecrantz d33b2b136f a/os: Add comments about DSOs 2022-10-27 17:19:57 +00:00
Jakob Bornecrantz 637c49c1ea a/os: Refactor out BLE functions into own library 2022-10-27 17:19:57 +00:00
Jakob Bornecrantz 96eabd1347 a/os: Add BLE stub functions 2022-10-27 17:19:57 +00:00
Jakob Bornecrantz d4a77da827 a/util: Add comments about DSOs 2022-10-27 17:19:57 +00:00
Jakob Bornecrantz e629bbbe2b a/util: Split out process functions into own library 2022-10-27 17:19:57 +00:00
Jakob Bornecrantz 8ca60f4304 a/util: Split out sink functions into own library 2022-10-27 17:19:57 +00:00
Jakob Bornecrantz c9ef44dd28 t/common: Remove stale comment 2022-10-27 17:19:57 +00:00
Bailey Morgan 67c47fbcb3 st/oxr: Change result code for invalid OpenGL context to match spec 2022-10-25 18:18:15 +00:00
Christoph Haag 9054dc01ca d/ht_ctrl_emu: Stub set_output 2022-10-24 17:20:59 +00:00
Christoph Haag 7dd0a6e473 st/oxr: Disable XR_KHR_convert_timespec_time on windows
This avoids a current CTS issue.
2022-10-20 12:33:02 +02:00
Mateo de Mayo 80fdf7317f t/slam: Add SLAM_UI option to enable the external system UI 2022-10-17 21:33:17 +00:00
Julian Petrov fb28f940b5 Fix an IPC protocol issue on windows when receiving zero HANDLEs 2022-10-14 10:49:50 -04:00
Julian Petrov d0f713c4c4 ipc: Add Windows support 2022-10-13 17:07:27 +00:00
Julian Petrov 7669d2c545 t/ctl: Don't build on Windows 2022-10-13 17:07:27 +00:00
Julian Petrov 5f4f7530d4 xrt: Introduce a new xrt_ipc_handle_t for IPC connections 2022-10-13 17:07:27 +00:00
Jakob Bornecrantz 12bb18a34c u/file: Fix define checks being erroneous 2022-10-12 13:05:39 +01:00
Jakob Bornecrantz 1cafa92c3b u/pacing: Refactor out tracing writing to own function 2022-10-11 20:33:56 +01:00
Jakob Bornecrantz 5ed13c6cc2 u/pacing: Account for present slop in assert 2022-10-11 20:33:56 +01:00
Jan Schmidt fc3fbd6093 d/ht: Fix rotation/flipping of right hands
When dealing with rotated cameras, rotate them backward
to vertical, and then flip the right hand image in
the affine transform to get correct orientation of hands
for the keypoint estimator. Before, the left hand images
were being fed in upside down.
2022-10-10 23:50:58 +00:00
Jakob Bornecrantz 9077261ada d/dai: Set fields after nullptr check 2022-10-10 22:39:38 +00:00
Jakob Bornecrantz 00c3cc4c2f d/dai: With the latest depthai-core we can support color OV9782 sensors 2022-10-10 22:39:38 +00:00
Jakob Bornecrantz 4814f627c6 d/dai: Fix conversion warnings 2022-10-10 22:39:38 +00:00
Jakob Bornecrantz 504a2a288e d/dai: Fix typo 2022-10-10 22:39:38 +00:00
Jakob Bornecrantz 52d225ae3b t/north_star: Fix build when we have depthai but no hand-tracking 2022-10-10 22:39:38 +00:00
Christoph Haag 751c8034bc c/main: Remove useless base_space from get_view_poses
The compositor doesn't know the concept of requesting view poses in
respect to a "space", so remove this vestigial code.
2022-10-10 15:47:19 +02:00
Julian Petrov 2e4c857a5a u/process: Make u_process work on non-linux systems 2022-10-09 15:21:37 +01:00
Julian Petrov c7a5a0bc1b u/file: Make more functions work on Windows 2022-10-09 15:21:37 +01:00
Robbie Bridgewater cc2e7b6da3 ipc: Allow IPC path to be set dynamically
Uses cache for XRT_IPC_MSG_SOCK_FILE
2022-10-09 15:21:11 +01:00