Commit graph

7110 commits

Author SHA1 Message Date
Mario Kleiner e7cbcefac6 t/north_star: Add slam device after HMD device.
The HMD display device apparently needs to be the first one in
the xdevs list. Comments in xrt_prober.h seem to confirm this.

Order hmd and slam device acccordingly in the north_star target
builder.

Otherwise XR client calls to xrEndFrame(), at least with projection
layers, will cause monado-service to crash, as it chooses the
"slam device" xdev as "HMD", instead of the actual hmd device,
and therefore dereferences a xdev->hmd which is NULL inside
_update_projection_layer() and thereby segfaults.

gdb backtrace after SIGSEGV:

_update_projection_layer (xc=0x7ffe60000bf0, ics=0x5555560a5208, layer=0x7fff0a5ed620, i=0) at /home/dragon/projects/monado/src/xrt/ipc/server/ipc_server_handler.c:749
749		uint32_t view_count = xdev->hmd->view_count;
(gdb) bt
0  _update_projection_layer (xc=0x7ffe60000bf0, ics=0x5555560a5208, layer=0x7fff0a5ed620, i=0) at /home/dragon/projects/monado/src/xrt/ipc/server/ipc_server_handler.c:749
1  0x00005555555abd30 in _update_layers (ics=0x5555560a5208, xc=0x7ffe60000bf0, slot=0x7fff0a5ed600) at /home/dragon/projects/monado/src/xrt/ipc/server/ipc_server_handler.c:973
2  0x00005555555ac060 in ipc_handle_compositor_layer_sync (ics=0x5555560a5208, slot_id=0, out_free_slot_id=0x7fff0a5ef134, handles=0x7fff0a5ef170, handle_count=0)
   at /home/dragon/projects/monado/src/xrt/ipc/server/ipc_server_handler.c:1058
3  0x00005555555a7167 in ipc_dispatch (ics=0x5555560a5208, ipc_command=0x7fff0a5ef840) at /home/dragon/projects/monado/build/src/xrt/ipc/ipc_server_generated.c:518
4  0x00005555555a56cc in client_loop (ics=0x5555560a5208) at /home/dragon/projects/monado/src/xrt/ipc/server/ipc_server_per_client_thread.c:191
5  0x00005555555a593d in ipc_server_client_thread (_ics=0x5555560a5208) at /home/dragon/projects/monado/src/xrt/ipc/server/ipc_server_per_client_thread.c:332

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2228>
2024-06-04 19:54:02 +00:00
Christoph Haag b681a01f7f doc: Document !2225 2024-06-01 01:41:21 +02:00
Christoph Haag ccfac98d36 st/oxr: Ignore primaryViewConfigurationType in headless
Spec:
"In a headless session, the XrSessionBeginInfo::primaryViewConfigurationType must be ignored and may be 0."
2024-06-01 01:39:59 +02:00
Rylie Pavlik 5980804535 c/util: Comments
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2220>
2024-05-31 16:52:38 +00:00
Rylie Pavlik 569419de07 c/render: Internal comments
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2220>
2024-05-31 16:52:38 +00:00
Rylie Pavlik a07bfba370 c/main: Internal comments
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2220>
2024-05-31 16:52:38 +00:00
Rylie Pavlik 342fab6b02 c/util: comp_scratch doc improvements
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2220>
2024-05-31 16:52:38 +00:00
Korcan Hussein 1e047b5b6d gradle,ci: Sign CI APKs for Android release builds
Co-authored-by: Rylie Pavlik <rylie.pavlik@collabora.com>
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2209>
2024-05-30 17:25:23 -05:00
Korcan Hussein 68beca75d4 doc: Document !2210
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2210>
2024-05-30 20:30:25 +00:00
Korcan Hussein 2639d830b6 st/oxr: Fixes crash bug in xrGetVisibilityMaskKHR for in-process builds
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2210>
2024-05-30 20:30:25 +00:00
Jan Schmidt 6cd8181b22 Changelog for !2227
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2227>
2024-05-30 19:51:13 +03:00
Jan Schmidt b66ccfb258 build: Rift S doesn't actually depend on hidapi.
Remove the dep from the Rift S driver checks

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2227>
2024-05-30 19:41:12 +03:00
Christoph Haag 5c70702c9b doc: Document !2194
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 8dd24bf28a xrt: Move OpenXR defines to header
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 8b2571b6ac st/oxr: Check for compile definitions after includes
If the defines are set in a header instead of with the compiler, they need
to be checked after includes.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 8f30fd137a scripts: Run generate_iwyu_mapping.py
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag cddf578092 st/oxr: Simplify path_cache pointers
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 13b5792a30 d/remote: Add palm pose
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag d8a151ced9 d/remote: Default to stereo
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 0d11937ae2 a/bindings: Mark grip_surface as available in KHR_maintenance1
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag bb2008ebf2 st/oxr: Add KHR_maintenance1
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 2371d68bbe a/bindings: Add meta/touch_controller_* profiles
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag b101db3705 a/bindings,xrt: Add Touch Plus controller
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 73686b340b a/bindings,xrt: Add touch pro controller
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag ab2e89affd a/bindings,xrt: Add FB_touch_controller_proximity
Adding virtual profiles is a bit of a hack that we may want to unify in the
future.

It also adds some redundant verification for paths like
"/user/hand/left/input/trigger"

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag d0a6fc2c3c a/bindings,xrt: Add vive focus 3 profile
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 397295274e a/bindings,xrt: Add vive cosmos controller profile
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag f2e1fdb26c a/bindings,xrt: Add pico neo3, 4, g3 controllers
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag cfd3a709ae a/bindings: Add curl, slide, proximity to schema
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 9eaa4d4921 a/bindings: Mark odyssey controller as promoted in 1.1
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 74111e68fd a/bindings: Mark magic leap 2 profile as promoted in 1.1
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag cf9ccb6993 a/bindings: Mark hp mr profile as promoted in 1.1
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 0f07f5fc0e a/bindings: add grip_surface virtual profile
Aliasing XRT_INPUT_GENERIC_GRIP_SURFACE_POSE to XRT_INPUT_GENERIC_PALM_POSE
would be complicated because it is implemented as an enum.
Therefore, just reuse XRT_INPUT_GENERIC_PALM_POSE for now.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag bbe33da56e st/oxr: Enable core local floor space in OpenXR 1.1
v2: st/oxr: Handle local floor in OpenXR 1.1 when extension is not available

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag eaf747eca2 u/space_overseer: skip actually locating spaces in themselves
It is always going to be identity. Keep calculating the offsets though.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 5ba58a5711 xrt,st/oxr,u/space_overseer: Implement advanced xrLocateSpaces
v2:

xrt: Allow NULL space in locate_spaces

For action spaces, an xrt_space is found if
get_xrt_space -> get_xrt_space_action -> oxr_action_get_pose_input
finds an active input. If no input is active, the xrt_space will be NULL.

ipc: Check allocation of space_ids for locate_spaces

st/oxr: Fix memory leak in xrLocateSpaces with invalid spaces

v3: ipc: Return error when locate_spaces allocation fails

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 0bd463c2af st/oxr: Add naive xrLocateSpaces[KHR,]
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag bff72f6c23 st/oxr: Add OXR_VERIFY_API_VERSION_AT_LEAST verification macro
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag ae7facbdc7 st/oxr: Add ENTRY_IF_VERSION_AT_LEAST to negotiate
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag cdbf4ef26a a/bindings: Generate code to verify paths for promoted core paths
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 7cf457d894 st/oxr,a/bindings: Move more verification logic to generated bindings
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag a35d7bd255 a/bindings: Remove XR_ prefix from extension names
They are removed in the generator script anyway.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 0a6209f153 a/binding: Link oxr-interfaces
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag a9d55c1cc8 st/oxr: Add oxr-interfaces INTERFACE for oxr st include path
Add vulkan and external-renderdoc to oxr-interfaces, needed on windows.

Also add compile definitions to oxr-interfaces

This is necessary for OXR_EXTENSION_SUPPORT_GENERATE to generate the same
list of extensions when including oxr_objects.h.

(e.g. XR_USE_OPENGL will not be set, causing struct oxr_extension_status
to not have a KHR_opengl_enable menmber.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 747665f2b0 ext/openxr: Update to OpenXR 1.1 headers
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag a2fae359e1 st/oxr: Debug print applicationInfo.apiVersion
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag b47eaaa266 st/oxr: Record OpenXR major.minor version on oxr_instance
This is needed to differentiate e.g. OpenXR 1.1 functionality from
OpenXR 1.0.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Christoph Haag 5ffe3c89a4 st/oxr: Fix applicationInfo apiVersion version check
st/oxr: Add OXR_IGNORE_OPENXR_VERSION debug var

This enables applications to run that require an OpenXR version that monado
does not support.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2194>
2024-05-28 22:09:13 +00:00
Jan Schmidt edb418aa1a d/ohmd: Reject WMR and Rift S drivers 2024-05-27 22:28:26 +00:00
Simon Zeni 1e5cfb399a doc: document !2168 2024-05-24 19:37:50 +00:00