Commit graph

5293 commits

Author SHA1 Message Date
Jakob Bornecrantz c21a8ef0cc st/oxr: Add controller extensions
Extensions enabled:
* XR_EXT_hp_mixed_reality_controller
* XR_EXT_samsung_odyssey_controller
* XR_ML_ml2_controller_interaction
2023-01-24 22:40:53 +00:00
Jakob Bornecrantz 6ce2978648 xrt: Add ML2 controller 2023-01-24 22:40:53 +00:00
Jakob Bornecrantz d231850771 xrt: Add Samsung Odyssey Controller 2023-01-24 22:40:53 +00:00
Jakob Bornecrantz 958911fd0b xrt: Add HP Reverb G2 Controller 2023-01-24 22:40:53 +00:00
Jakob Bornecrantz ed1f18bb74 xrt: More space in xrt_input_name enum list 2023-01-24 22:40:53 +00:00
Jakob Bornecrantz 213cc271f6 xrt: Sort xrt_device_name enums 2023-01-24 22:40:53 +00:00
Jakob Bornecrantz da5323642d m/space: Correct comments 2023-01-24 16:11:56 +00:00
Jakob Bornecrantz c7fdaacd02 m/space: Make sure to use valid poses in linear and angular calculations 2023-01-24 16:11:56 +00:00
Jakob Bornecrantz f7118d7a93 m/space: Refactor pose part first 2023-01-24 16:11:56 +00:00
Jakob Bornecrantz 02aad19c78 m/space: Make pose validity upgrading clearer 2023-01-24 16:11:56 +00:00
Jakob Bornecrantz 2c1d413bf0 m/space: Add missing extern "C" 2023-01-24 16:11:56 +00:00
Jakob Bornecrantz 1c046dc523 m/space: Move functions to correct section 2023-01-24 16:11:56 +00:00
Jakob Bornecrantz 7130fc57ca tests: Add some simple relation chain tests 2023-01-24 16:11:56 +00:00
Robbie Bridgewater 17560d0618 a/util,st/gui: Add i64 as a debug GUI type 2023-01-24 15:35:39 +00:00
Fernando Velazquez Innella e035d060d1 c/render: implement render_resources_get_duration
Useful for systems that don't support calibrated timestamps and caseas where only execution time measuring is needed.
2023-01-24 15:35:31 +00:00
Ryan Pavlik 85a897a0b5 a/d3d,a/vk,c/client,ipc: D3D Depth texture / DXGI handle support
a/d3d: Improve allocation

Enable D3D11 and D3D112 depth images using DXGI handles

Allow D3D depth by default

D3D: only use DXGI handles

NT handles don't support depth formats and may fail to properly interop with Vulkan with some image dimensions.

Removed D3D_COMPOSITOR_ALLOW_DEPTH env.
D3D now always imports depth.

Added authorship.

Format pass

Fix D3D compositor tests

ipc: Fix HANDLE bit twiddling code

Merge into commits related to D3D depth changes. Makes the code compile
as C++, useful for Windows traceing

Co-authored-by: Robbie Bridgewater <ebridgewater@magicleap.com>
Co-authored-by: Fernando Velazquez Innella <finnella@magicleap.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-01-24 15:35:22 +00:00
Ryan Pavlik 2db2fb94b7 tests: Verify Vulkan import in D3D11 alloc test 2023-01-24 15:35:09 +00:00
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
Christoph Haag bb75281907 ext/tracy: Link dl 2023-01-19 20:00:30 +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
Gabriele Boccone d1b431bec6 cmake: D3D12 status on console output. 2023-01-10 14:38:19 +00: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 7da72f4697 external/nanopb: Generate monado_metrics with same version as files 2022-12-22 22:06:39 +00:00
Ryan Pavlik a7b9c7b69c external/nanopb: Update nanopb from upstream nanopb-0.4.7
GitOrigin-RevId: b97aa657a706d3ba4a9a6ccca7043c9d6fe41cba
2022-12-21 21:24:14 +00:00
Jakob Bornecrantz 8338599571 cmake: Set C11 standard 2022-12-21 21:24:14 +00:00
Ryan Pavlik 374a256d59 scripts: Add more copybara workflows 2022-12-21 09:46:24 -06:00
Jakob Bornecrantz 966878b1db t/sdl_test: Make sure to include inttypes.h for PRIu64 define 2022-12-21 00:49:06 +00:00
Ryan Pavlik 9705b1e763 external/cjson: Update cJSON from upstream v1.7.15
GitOrigin-RevId: d348621ca93571343a56862df7de4ff3bc9b5667
2022-12-20 18:51:08 +00:00
Ryan Pavlik 2b78b6de1b scripts: Add copybara config for updating stb. 2022-12-20 12:00:09 -06:00
Ryan Pavlik 00b1c9531d external/stb: Update stb libraries from upstream
GitOrigin-RevId: 1ee679ca2ef753a528db5ba6801e1067b40481b8
2022-12-20 11:54:28 -06:00
Jakob Bornecrantz 814170469a t/sdl_test: Include m_mathinclude to fix compile on Windows 2022-12-20 16:02:18 +00:00
0y8w1x 345ac9c635 scripts: Add setBoardInfo to the DepthAI calibration upload script 2022-12-19 20:32:44 +00:00
Jakob Bornecrantz 1472bdf6b6 c/client: Create a share context instead of using context directly 2022-12-19 16:38:51 +00:00