Commit graph

5516 commits

Author SHA1 Message Date
Jakob Bornecrantz 19da398713 c/render: Use define helpers in distortion code 2023-10-03 21:51:03 +00:00
Jakob Bornecrantz d72627ceb7 a/vk: Fix leak in extension checking code 2023-10-03 20:57:11 +00:00
Jakob Bornecrantz cf1f03b175 a/vk: Remove unused vk_has_error 2023-10-03 01:11:14 +01:00
Jakob Bornecrantz 6d43e3e4b7 a/vk: Remove unused vk_check_error define 2023-10-03 01:11:14 +01:00
Jakob Bornecrantz f4455271c9 a/vk: Remove unused vk_check_error_with_free define 2023-10-03 01:11:14 +01:00
Jakob Bornecrantz e10c0e5d40 c/main: Use VK_CHK_WITH_RET instead of vk_check_error 2023-10-03 01:11:14 +01:00
Jakob Bornecrantz f75eabea29 a/vk: Use VK_CHK_WITH_RET instead of vk_check_error 2023-10-03 01:11:14 +01:00
Jakob Bornecrantz 8c512f9890 a/vk: Introduce VK_CHK_* helpers 2023-10-03 01:11:14 +01:00
Jakob Bornecrantz 42080b068c a/vk: Add mini defines helpers 2023-10-03 01:11:14 +01:00
Jakob Bornecrantz 0fb3e9a943 a/vk: Use vk_print_result instead of vk_has_error 2023-10-03 01:11:14 +01:00
Jakob Bornecrantz 6316bf39a9 a/vk: Add vk_print_result helper 2023-10-03 01:11:14 +01:00
Jakob Bornecrantz 0fa30c0fbe c/main: Print error on bad fast path state 2023-10-02 21:48:50 +01:00
Jakob Bornecrantz 3c82beb1a1 c/main: Fix mistake in dispatch_graphics
Closes #290
2023-10-02 21:48:43 +01:00
BabbleBones 4c1c593bf4 steamvr_lh: add frame mutex to prevent double free 2023-09-30 16:19:40 +00:00
Jakob Bornecrantz e33418de56 c/main: Refactor dispatch_graphics function 2023-09-29 12:00:03 +01:00
Jakob Bornecrantz 4893638ccd c/main: Remove the command buffer in layer renderer
This makes it so that we only use one command buffer
for the entire frame, which gives us a nice speed up.
2023-09-29 12:00:03 +01:00
Jakob Bornecrantz ce4e11686e c/main: Use scratch image for layer renderer 2023-09-29 12:00:03 +01:00
Jakob Bornecrantz 7e5615fee1 c/main: Use render's render pass in layer renderer 2023-09-29 12:00:03 +01:00
Jakob Bornecrantz d46e619d3c c/main: Create render pass and targets for scratch images 2023-09-29 12:00:03 +01:00
Jakob Bornecrantz 7a9aa05d46 c/main: Let main compositor decide size of scratch image 2023-09-29 12:00:03 +01:00
Jakob Bornecrantz 84a0277ee7 c/render: Make srgb_view renderable for scratch images 2023-09-29 10:43:18 +01:00
Jakob Bornecrantz 29574dfea3 c/render: Refactor out a render pass object 2023-09-29 10:43:18 +01:00
Jakob Bornecrantz 7c512b2fc5 c/render: Refactor external render pass into a implicit one 2023-09-29 10:43:18 +01:00
Jakob Bornecrantz d4f3c794df c/render: Don't enable depth testing and writing for mesh shader
It's not used, so don't leave it on.
2023-09-29 10:43:18 +01:00
Jakob Bornecrantz b6e5a89c97 u/pacing: Add minimum app margin 2023-09-28 15:23:46 +01:00
Jakob Bornecrantz 560265357b u/pacing: Rename wait time to gpu time [NFC] 2023-09-28 15:23:46 +01:00
Jakob Bornecrantz 6a007b2986 c/util: Fix subimage flipping 2023-09-26 19:57:28 +01:00
Ryan Pavlik e1bb2221cc a/gstreamer: Trim includes in header 2023-09-26 11:37:41 -05:00
Fernando Velazquez Innella 151e1aaf14 a/vk: Init vk bundle with shaderImageGatherExtended enabled if supported 2023-09-24 20:59:07 +00:00
Jakob Bornecrantz ba08985126 a/vive: Fix use after free 2023-09-23 18:33:00 +01:00
Jakob Bornecrantz 82192a43f9 ipc: Generate limited unique ids for native swapchains 2023-09-21 22:34:06 +01:00
Jakob Bornecrantz 151b3005d5 c/util: Generate limited unique ids for native swapchains 2023-09-21 22:34:06 +01:00
Jakob Bornecrantz f27cb14669 u/limited_unique_id: Add process unique id generator 2023-09-21 22:34:06 +01:00
Jakob Bornecrantz 22770320f2 xrt: Add limited unique id to native swapchains 2023-09-21 22:34:06 +01:00
Jakob Bornecrantz b6a80f0fd9 xrt: Add xrt_limited_unique_id 2023-09-21 22:34:06 +01:00
Jakob Bornecrantz e501116d87 c/main: Trace mirror blit function 2023-09-21 22:34:06 +01:00
Jakob Bornecrantz 15743d822b st/gui: Refactor a few OpenGL drawing code into helper 2023-09-21 22:34:06 +01:00
Jakob Bornecrantz bde2dce2b6 st/gui: Improve thread safety, improve comments and spelling 2023-09-21 22:00:07 +01:00
Jakob Bornecrantz 53f510e6b9 st/gui: Rename file with OpenGL sink functions [NFC] 2023-09-21 00:39:03 +01:00
Jakob Bornecrantz d2d505d9e3 ext/imgui: Add function to draw image with background color 2023-09-21 00:39:03 +01:00
Jakob Bornecrantz 05a3f3e055 ext/imgui: Remove unnecessary braces [NFC] 2023-09-20 16:57:10 +01:00
Jakob Bornecrantz fe8c4116ec t/sdl_test: Use helper to import images 2023-09-20 16:50:58 +01:00
Jakob Bornecrantz 95e1c9c8dd a/ogl: Add helper to import native images 2023-09-20 16:50:58 +01:00
Jakob Bornecrantz 1a543cb0c0 a/ogl: Add Vulkan to OpenGL conversion function 2023-09-20 16:50:58 +01:00
Jakob Bornecrantz 3c1d8dafaa a/ogl: Put comment in group [NFC] 2023-09-20 16:50:58 +01:00
Jakob Bornecrantz 141e598295 c/render: Optimize layer shader 2023-09-20 16:41:30 +01:00
Jakob Bornecrantz bd38e90b51 c/main: Use new helpers to dispatch compute 2023-09-20 16:41:30 +01:00
Jakob Bornecrantz a5792222a4 c/util: Add helpers to fully dispatch compute pipeline 2023-09-20 16:41:30 +01:00
Jakob Bornecrantz ee2fe9fd40 c/[render|main]: Refactor scratch images
This commit does a few things:

* Makes the scratch images per view
* Introduces a new struct that is managed by the renderer
2023-09-20 16:41:30 +01:00
Jakob Bornecrantz fed360e98b c/[render|util|main]: Refactor layer squasher code
This commit does a couple of things in one go.

* The layer squasher now dispatches once per view.
  * Reducing the number of samplers needed.
  * Allows for per view target.
* Refactor the setup code to comp_util.
* The layout transition part now happens in new helper code.

On my system this change is very marginally slower,
around 0.05ms and 0.1ms slower on average.
2023-09-20 16:41:30 +01:00
Jakob Bornecrantz dd21f3c7ec c/render: Explain how we get the direction [NFC] 2023-09-20 16:41:30 +01:00
Jakob Bornecrantz 7996013e4d c/render: Rename defines to proper prefix [NFC] 2023-09-20 16:41:30 +01:00
Jakob Bornecrantz 7441a9bda6 c/render: Better names for descriptor sets [NFC] 2023-09-20 16:41:30 +01:00
Jakob Bornecrantz 50adb87d79 c/util: Tweak cmake [NFC] 2023-09-20 16:41:30 +01:00
Jakob Bornecrantz 6860fcc7ba c/client: Tidy D3D12 whitespace [NFC] 2023-09-20 15:37:34 +01:00
Jakob Bornecrantz 768cc06a8e c/client: Tidy call [NFC] 2023-09-20 15:37:34 +01:00
Fernando Velazquez Innella 9918e55fbf c/client: Use native d3d12 allocator.
Includes a workaround for D3D12 and Vulkan interop issues in NVidia
hardware. We want to directly allocate in D3D12 to be able to use all
resource flags during creation, such as multi-gpu ones.
2023-09-20 15:37:34 +01:00
Fernando Velazquez Innella 6342c72665 a/d3d: Add native d3d12 allocator and copy helpers.
Add a D3D12 allocator and helper code to copy from shadow images,
the copy is needed to work around a interop issue on NVIDIA hardware.

Co-authored-by: Ryan Pavlik <ryan.pavlik@collabora.com>
2023-09-20 14:10:40 +00:00
Jakob Bornecrantz 740ff1bcf5 c/render: Stop timewarp stretching by changing math
Tested-by: BabbleBones <BabbleBones@protonmail.com>
2023-09-17 16:00:27 +01:00
Ryan Pavlik 5b0f7cb5ef c/main: Fix doxygen warning
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-09-13 20:29:36 +01:00
Ryan Pavlik a57c7a2408 xrt: Fix doxygen warnings 2023-09-13 20:21:57 +01:00
Ryan Pavlik 2398dc6ca4 t/common: Fix doxygen warnings 2023-09-13 20:21:57 +01:00
Ryan Pavlik aa2cc78396 st/oxr: Fix doxygen warnings 2023-09-13 20:21:57 +01:00
Ryan Pavlik 63b18384dc d/nreal_air: Fix doxygen warnings 2023-09-13 20:21:57 +01:00
Ryan Pavlik a66aeca91a c/client: Fix doxygen warnings 2023-09-13 20:21:57 +01:00
Ryan Pavlik c458ed6fee d/steamvr_lh: Fix doxygen warnings 2023-09-13 20:21:57 +01:00
Ryan Pavlik 3b1eb21e9f a/vk: Fix doxygen warnings 2023-09-13 20:21:57 +01:00
Ryan Pavlik 74914f35d5 a/util: Fix doxygen warnings 2023-09-13 20:21:57 +01:00
Ryan Pavlik 5fc532d23f a/tracking: Fix doxygen warnings 2023-09-13 20:21:57 +01:00
Jiali Zhang baf6c7f78d st/oxr: Implementation of XR_KHR_android_thread_settings 2023-09-13 20:13:20 +01:00
Jakob Bornecrantz 54017f6b3e c/multi: Add stub set thread hint function 2023-09-13 20:04:52 +01:00
Jiali Zhang 81a094f990 ipc: Add support for thread hint function 2023-09-13 20:04:49 +01:00
Jiali Zhang faec524709 xrt: Add thread hint function 2023-09-13 20:03:17 +01:00
Jakob Bornecrantz 3de99b63d9 ipc: Add a interface header for ipc_server_main[_android] 2023-09-13 17:33:55 +00:00
Jakob Bornecrantz 5be0767aa9 ipc: Add a interface header for ipc_instance_create 2023-09-13 17:33:55 +00:00
Jakob Bornecrantz ad520c82c3 a/vk: Make sure to print the first GPU as well 2023-09-13 17:18:25 +00:00
Jakob Bornecrantz 7b3763650e a/vk: Also print device type when listing GPUs 2023-09-13 17:18:25 +00:00
Jakob Bornecrantz ccf232d4ac a/vk: Add vk_physical_device_type_string 2023-09-13 17:18:25 +00:00
Jakob Bornecrantz ceeeb2d136 a/vk: Make VkPhysicalDeviceProperties argument const 2023-09-13 17:18:25 +00:00
Lubosz Sarnecki 040ad33188 t/libmonado: Add libmonado implementation
Work done by lots of different authors that did various pieces of the library.

Co-authored-by: Korcan Hussein <korcan.hussein@collabora.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
Co-authored-by: Ryan Pavlik <ryan.pavlik@collabora.com>
2023-09-12 15:38:31 +01:00
Zhongwang Zhang f60c512cc9 external: Update android-jni-wrap, add Display.Mode 2023-09-08 15:15:24 +00:00
Mateo de Mayo 1da029adaa t/slam: Turn timestamp asserts into warnings 2023-09-08 13:12:21 +00:00
Mateo de Mayo f8932fe879 t/slam: Add reset state button 2023-09-08 13:12:21 +00:00
Mateo de Mayo 5fd73ea70c external/slam: Update to 7.0.0 with RESET_TRACKER_STATE and ignore masks 2023-09-08 13:12:21 +00:00
Mateo de Mayo ae1de1f2b5 a/vive: Add FoV tweaks for another index HMD 2023-09-08 13:12:21 +00:00
Mateo de Mayo a4a6850094 h/mercury: Add min detection confidence option 2023-09-08 13:12:21 +00:00
Mateo de Mayo 14c1ecc96e t/euroc: Allow euroc recorder to start and stop recordings in the same session 2023-09-08 13:12:21 +00:00
dengkail a809635fe6 t/android_common: Specify mutability flag for PendingIntent object.
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or
FLAG_MUTABLE to be specified when creating a PendingIntent, according to
https://developer.android.com/guide/components/intents-filters#DeclareMutabilityPendingIntent.
2023-09-08 13:43:40 +01:00
BabbleBones 9033ff4b91 steamvr_lh: Correct angular and linear velocities 2023-09-08 13:30:29 +01:00
BabbleBones 10d0ab7e1e steamvr_lh: Correct jitter and pull latest timestamp on hands 2023-09-08 13:30:24 +01:00
Gabriele Musco 23ac74415d d/steamvr_lh: Add support for new SteamVR display component v3 interface
First try v3 then fallback to v2 should it not be available.
2023-09-08 12:10:55 +00:00
Mateo de Mayo d486338985 t/hand: Reduce relation history lock contention
Relation history was being accessed guarded by an external lock in a couple of
places. This is redundant since its implementation already defines an internal
lock.
2023-09-08 12:56:34 +01:00
Mateo de Mayo c6ca7d2339 d/vive: Reduce relation history lock contention
Relation history was being accessed guarded by an external lock in a couple of
places. This is redundant since its implementation already defines an internal
lock.
2023-09-08 12:56:18 +01:00
Mateo de Mayo 3bf927f03f d/na: Reduce relation history lock contention
Relation history was being accessed guarded by an external lock in a couple of
places. This is redundant since its implementation already defines an internal
lock.
2023-09-08 12:56:02 +01:00
Mateo de Mayo 2e55c54b8f d/na: Destroy relation history 2023-09-08 12:53:10 +01:00
Mateo de Mayo ce929e804c a/math: Add lock for relation history get_size 2023-09-08 12:53:10 +01:00
Jakob Bornecrantz 1f49e43724 c/main: Always use the mode's extents when creating the surface
This fixes a bug on NVIDIA Jetson. Note this isn't so much the NVIDIA Jetson
fault, while the code was working on desktop, Monado did something wrong.
What happned was that Monado would select a mode with one size, while then
creating a VkSurface/VkSwapchain of a different size. This would work on
hardware with scalers/panning modes. The NVIDIA Jetson apparently doesn't have
support for that so failed when presenting. This patch makes sure that the
VkSurface/VkSwapchain extents match the mode for all direct mode targets.
2023-09-08 10:47:58 +01:00
Jakob Bornecrantz 9bac7ed30e c/main: Print creation info for direct mode objects 2023-09-08 10:47:58 +01:00
Jakob Bornecrantz 67c24ebe92 c/main: Free plane_properties earlier 2023-09-08 10:31:42 +01:00
Jakob Bornecrantz e95b6932eb c/main: Use more enumeration helpers 2023-09-08 10:31:42 +01:00
Jakob Bornecrantz e37041cc61 a/vk: Add printing functions for create info structs 2023-09-08 10:31:42 +01:00
Jakob Bornecrantz 113f747742 a/vk: Print more VkSurface info 2023-09-08 10:31:42 +01:00
Jakob Bornecrantz 648a168219 a/vk: Even more flag bits string functions 2023-09-08 10:31:42 +01:00
Jakob Bornecrantz d905f79025 a/vk: Improve old flag bits string functions
Make old flag bits string functions like the new ones.
2023-09-08 10:31:42 +01:00
Jakob Bornecrantz ef7aeef971 a/vk: Add flag bits string functions 2023-09-08 10:31:42 +01:00
Jakob Bornecrantz 217874507b a/vk: Re-order functions [NFC] 2023-09-08 10:31:42 +01:00
Jakob Bornecrantz f08a4abb3f a/vk: Add string function for VkSharingMode 2023-09-08 10:31:42 +01:00
Jakob Bornecrantz e732265e64 a/vk: Add more enumeration helpers 2023-09-08 10:31:42 +01:00
Tobias Frisch 75cab73f70 d/na: Add driver for the Nreal Air glasses 2023-09-07 14:07:10 +00:00
Jakob Bornecrantz 843e98e853 c/client: Make sure to not double CloseHandle semaphore HANDLE 2023-09-04 22:26:08 +00:00
BabbleBones 80745f32b3 d/steamvr_lh: Fix zero IPD read 2023-09-02 13:50:01 +01:00
BabbleBones a67aae104b d/steamvr_lh: Fix prediction jitter and remove LH_PREDICTION 2023-09-02 13:50:01 +01:00
Gabriele Musco edaa9320db d/steamvr_lh: Log generic tracker 2023-09-02 13:49:57 +01:00
BabbleBones 5d35ae6dc3 d/steamvr_lh: Wands as any hand controllers 2023-09-02 13:49:54 +01:00
BabbleBones e49be97a3e d/steamvr_lh: Mark init controller state unknown 2023-09-02 13:49:49 +01:00
BabbleBones 466398dc5a d/steamvr_lh: Enable vive tracker pucks 2023-09-02 13:49:45 +01:00
Jakob Bornecrantz 6b815eba51 ipc: Removed unused define [NFC] 2023-09-01 19:50:46 +01:00
Jakob Bornecrantz a0fd61ec1e st/steamvr_drv: Use undef instead of comment for debug define [NFC] 2023-09-01 19:50:34 +01:00
Jakob Bornecrantz 87ec56ca17 d/vive: Use undef instead of comment for debug define [NFC] 2023-09-01 19:50:18 +01:00
Jakob Bornecrantz 74fed516e3 t/psvr: Use undef instead of comment for debug define [NFC] 2023-09-01 19:50:07 +01:00
Jakob Bornecrantz c49a2a5f4d st/gui: Add optional curated debug GUI
Setting XRT_CURATED_GUI to true makes the curated the default.

You can switch between the two UIs during runtime.
2023-09-01 15:42:06 +00:00
sdegrande f290b6418d t/sdl_test: sdl-test needs OpenGL4.5
sdl-test uses some OpenGL4.5 features, such as Texture Objects.

Currently, sdl-test is initialized with an OpenGL3.3 context, and with
a NVidia driver (version 535.98, on Linux), the call to those features
(glCreateTextures() being the first of them) segfaults.
2023-09-01 14:51:41 +00:00
Hui Xu d5b9ae137e ipc/android: Dup the fd from JVM and maintain it in native
- dup the fd in native part to avoid fd_san error
2023-08-22 18:54:26 +00:00
Jakob Bornecrantz b699d0a2b3 os/threading: Document os_cond 2023-08-22 18:49:11 +01:00
Weijie Wang 7d8ca2c162 os/threading: Add mutex recursive wrapper 2023-08-22 18:42:00 +01:00
Ryan Pavlik ef7b1133c6 a/util: Fix missing include for generic callback structure.
Also extend the tests to actually include invocation of callbacks,
and rename a template parameter for clearer usage.
2023-08-16 16:03:58 -05:00
Alex Badics 83976d7d2c d/rokid: add Rokid Air and Max driver 2023-08-16 15:40:09 +02:00
Jakob Bornecrantz 0fb5025997 d/steamvr_lh: Only use the relation history buffer for poses
Also enables prediction to be toggled on.
2023-08-16 13:05:20 +01:00
BabbleBones 577a9aa420 d/steamvr_lh: Basic controller log info
Co-Authored-By: Gabriele Musco <gabmus@disroot.org>
2023-08-16 13:04:23 +01:00
BabbleBones 0ee05e9c38 d/steamvr_lh: Vive tracker input hookup
Co-Authored-By: Gabriele Musco <gabmus@disroot.org>
2023-08-16 13:04:23 +01:00
BabbleBones c139925e83 d/steamvr_lh: Add Valve Knuckles support and emulated hands
Co-Authored-By: Gabriele Musco <gabmus@disroot.org>
2023-08-16 13:04:23 +01:00
BabbleBones 938dd9c74f d/steamvr_lh: Lighthouse info print
Co-Authored-By: Gabriele Musco <gabmus@disroot.org>
2023-08-16 13:04:23 +01:00
BabbleBones 81e827b4bf d/steamvr_lh: Configure canted eyes & IPD
Co-Authored-By: Gabriele Musco <gabmus@disroot.org>
2023-08-16 13:04:20 +01:00
BabbleBones 6d8463823b d/steamvr_lh: Add support for Vive Pro & Index
Co-Authored-By: Gabriele Musco <gabmus@disroot.org>
2023-08-14 19:36:37 +01:00
BabbleBones 8f9dd99df5 d/steamvr_lh: Set driver ipd & brightness on HMD
Co-Authored-By: Gabriele Musco <gabmus@disroot.org>
2023-08-14 19:35:00 +01:00
BabbleBones 8795268c86 d/steamvr_lh: Fix warnings
Co-Authored-By: Gabriele Musco <gabmus@disroot.org>
2023-08-14 17:41:15 +01:00
BabbleBones 841a459a7b a/vive: Support c++ pose info
Co-Authored-By: Gabriele Musco <gabmus@disroot.org>
2023-08-14 17:41:15 +01:00
Lubosz Sarnecki f0cb6c1d6d st/prober: Define functions only when PSVR or PSMV are enabled.
Fixes GCC 13 warning [-Wunused-function].

Define on_video_device and p_factory_ensure_frameserver only when PSMV
or PSVR are enabled. Drop redundant check for XRT_HAVE_OPENCV, since we
already do it above.
2023-08-14 16:57:28 +01:00
Lubosz Sarnecki a2d3621058 st/prober: Move rgb struct declaration.
Fixes GCC 13 warning [-Wunused-variable].

Only declare rgb struct when PSVR is enabled, where it's only used.
2023-08-14 16:57:28 +01:00
Lubosz Sarnecki 634fa71fda h/mercury: Don't write over allocated string size.
Fixes GCC 13 warning [-Wstringop-truncation].
2023-08-14 16:55:33 +01:00
Lubosz Sarnecki 68faf2bc89 t/psvr: Initialize Eigen vector with zeros.
Fixes very verbose GCC 13 warning [-Wmaybe-uninitialized].
2023-08-14 16:55:33 +01:00
Lubosz Sarnecki b0d47951f6 c/main: Pass wm_capabilities to xdg_toplevel_listener.
Fixes GCC 13 and clang 15 warning [-Wmissing-field-initializers].

For recent Wayland versions, correctly initialize the
xdg_toplevel_listener struct.
2023-08-14 16:55:33 +01:00
Lubosz Sarnecki eb438b2381 c/client: Actually use modified xrt_swapchain_create_info.
Fixes GCC 13 warning [-Wunused-but-set-variable].

Use the modified copy of xrt_swapchain_create_info instead of the
const pointer parameter.
2023-08-14 16:55:33 +01:00
Lubosz Sarnecki 1761d98a2e t/common: Use same return type as in interface.
Fixes GCC 13 warning [-Wenum-int-mismatch].

Return xrt_result_t in the implementation of xrt_instance_create in
target_instance_no_comp.c, as declared in xrt_instance.h and already
done in target_instance.c.

Return proper xrt_result_t instead of plain ints.
2023-08-14 16:55:33 +01:00
Lubosz Sarnecki 6956042fb4 d/remote: Use same return type as in interface.
Fixes GCC 13 warning [-Wenum-int-mismatch].

Use same return type in for r_create_devices definition in r_hub.c as in
the declaration in r_interface.h.

The function was already returning correct xrt_result_t.
2023-08-14 16:55:33 +01:00
Jakob Bornecrantz 41927e802c st/gui: Fix warning by using safe casts 2023-08-14 15:38:36 +01:00
Jakob Bornecrantz 6fc9bef385 m/vec3: Add float array helper 2023-08-14 15:38:36 +01:00
Jakob Bornecrantz 66d8e8066a m/vec2: Add float array helper 2023-08-14 15:38:36 +01:00
Charlton Rodda 3b0af8d184 d/qwerty: Make controller support press-and-hold 2023-08-14 13:53:03 +01:00
0y8w1x e6bbfe7b4b u/truncate_printf: Fix spelling [NFC] 2023-08-14 13:19:27 +01:00
Lubosz Sarnecki 60c57792d9 t/common: Fix build with XRT_BUILD_DRIVER_VIVE=OFF.
vive_source.h always needs to be included for
vive_source_hook_into_sinks. vive_device.h always needs to be included
for vive_tracking_status struct.
2023-08-09 16:50:36 +02:00
Jarett Millard 9daeeaec94 d/pssense: Add trigger force feedback 2023-08-01 00:24:05 +01:00
0y8w1x 318f25f1f1 build: Add define to only build with PSVR driver support 2023-07-31 23:47:24 +02:00
Korcan Hussein 71dcc61ed2 xrt: Adds new xrt_device_name entry for XR_EXT_hand_interaction
Prior to this, the existing `xrt_device_name` entry
`XRT_DEVICE_HAND_INTERACTION` was re-used for `XR_EXT_hand_interaction`
bindings however this `xrt_device_name` is used to look up the older
hand-interaction profile `XR_MSFT_hand_interaction`. This commit adds a new
`xrt_device_name` entry dedicated for `XR_EXT_hand_interaction` and fixes the
incorrect profile look for suggested bindings during runtime.
2023-07-27 12:29:51 +01:00
Regan 88ca0b1a94 d/android: Fixed the issue of screen stuttering on some Android devices 2023-07-24 17:28:53 +01:00
Pedro Santos d1eae403e4 d/survive: Add Vive Pro 2 support 2023-07-24 15:23:23 +01:00
Pedro Santos 2a3ac52eb8 d/vive: Add Vive Pro 2 support 2023-07-24 15:23:19 +01:00
Pedro Santos 9b0815bc82 a/vive: Add Vive Pro 2 support 2023-07-24 15:23:14 +01:00
Jakob Bornecrantz e255cf8771 c/main: Fix NVIDIA direct mode detection code
Fix bug introduced in 14ffa34658 (!1894).
2023-07-23 15:36:11 +01:00
Jakob Bornecrantz 0da57b30a4 st/oxr: Add XR_MNDX_system_buttons support 2023-07-21 16:28:43 +00:00
Jakob Bornecrantz 314fc9c583 ext/openxr: Add XR_MNDX_system_buttons header 2023-07-21 16:28:43 +00:00
Linus Lüssing 59d3bab0f6 a/bindings: Add WinMR system buttons
Currently there does not seem to be a way to access the SteamVR
dashboard with the Reverb G2 (controllers).

This adds a binding that allows to use the system/home button to
open the SteamVR dashboard.

Remark: In the OpenXR 1.0 spec there is no binding for
/input/system in XR_EXT_hp_mixed_reality_controller. However on Windows
this button would supposedly allow to (indirectly?) access the
SteamVR dashboard. (Which I can't confirm myself, as I don't have
access to a Windows OS right now.) To properly support system buttons in
OpenXR introduce XR_MNDX_system_buttons.

Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
2023-07-21 16:28:43 +00:00
Jakob Bornecrantz 14ffa34658 c/main: Use enumeration helpers and tidy NVIDIA target code 2023-07-21 15:45:56 +00:00
Jakob Bornecrantz d5bbaed88a c/util: Use enumeration helpers 2023-07-21 15:45:56 +00:00
Jakob Bornecrantz df5601fc1e a/vk: Use enumeration helpers 2023-07-21 15:45:56 +00:00
Jakob Bornecrantz 9193427964 a/vk: Add enumeration helpers 2023-07-21 15:45:56 +00:00
Jakob Bornecrantz 7dae8d1ddd ipc: Add a stable ID for clients
Co-authored-by: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
2023-07-18 17:33:52 +02:00
Jakob Bornecrantz 1920a9f0d7 ipc: Send less information when describing the client 2023-07-18 17:33:52 +02:00
Jakob Bornecrantz 2edf07749b ipc: Rename client connected function and document code 2023-07-18 17:33:52 +02:00
Lubosz Sarnecki 0195e22341 t/ctl: Use correct ipc call for toggling client I/O. 2023-07-18 17:33:52 +02:00
huanchen db230b3dcb ipc: Unmap shared memory before destroy 2023-07-18 13:43:01 +01:00
Jakob Bornecrantz bb1aa17626 xrt: Trailing comma on all enums [NFC]
Makes changes adding new entires have less lines changed.
2023-07-18 11:45:08 +01:00
Jakob Bornecrantz ab965deb65 a/android: Reflow code for prettier layout [NFC] 2023-07-18 11:45:08 +01:00
Jakob Bornecrantz 9a17faa59d a/android: Add warning when not getting refresh rate and returning 60hz [NFC] 2023-07-18 11:45:04 +01:00
quic_zhozhan 6aea10f57b st/oxr: Add XR_OPPO_controller_interaction extension 2023-07-17 10:53:32 +01:00
quic_zhozhan 191e7d6269 xrt: Add OPPO MR controller 2023-07-17 14:13:00 +08:00
Jakob Bornecrantz 201c81813d st/gui: Add helper to draw sink to background 2023-07-14 13:54:06 +01:00
Jakob Bornecrantz a8dd070951 st/gui: Add code to draw gui_window_record to background 2023-07-14 13:54:06 +01:00
Jakob Bornecrantz c3b741d4fd st/gui: Refactor debug_record creation into helper 2023-07-14 13:54:06 +01:00
Jakob Bornecrantz d38fb165ce st/gui: Refactor out more multi-line gui elements 2023-07-14 13:54:06 +01:00
Jakob Bornecrantz 32b878e196 st/gui: Refactor and tidy helper functions 2023-07-14 13:54:06 +01:00
Jakob Bornecrantz ea13c373c5 st/gui: Reshuffle and document debug gui struct 2023-07-14 13:54:06 +01:00
Jakob Bornecrantz ff9f68bc96 st/gui: Remove unused priv_tuple struct 2023-07-14 13:54:06 +01:00
Jakob Bornecrantz cd7e921a03 u/var: Expose root object raw name 2023-07-14 13:54:03 +01:00
Jakob Bornecrantz ea77386887 u/var: Use a struct to carry information in root object callbacks 2023-07-14 13:53:36 +01:00
Jakob Bornecrantz 7ef4007196 u/var: Improve doc comments [NFC] 2023-07-13 23:31:51 +01:00
Jakob Bornecrantz 04298976da u/var: Rename suffix_with_number argument [NFC]
Clearer, and frees up the number name inside of the function.
2023-07-13 23:31:51 +01:00
Jakob Bornecrantz 6208a8f1a5 c/main: Set sequence to be the frame id on mirror window 2023-07-13 23:31:51 +01:00
Korcan Hussein b6b5610c05 xrt|ipc|st/oxr: Adds support for XR_EXT_hand_interaction profile. 2023-07-12 14:14:08 +01:00
Jakob Bornecrantz f65ea4e6b1 ext/openxr: Update headers to 1.0.28 2023-07-11 16:31:51 +01:00
utzcoz 25d9437924 st/oxr: Remove non-reachable return for oxr_xrPathToString
The OXR_TWO_CALL_HELPER returns whenever succeed or failed.

Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-07-08 11:42:57 +08:00
Gabriele Musco 1c415d9e9b u/logging: Add json logging behind XRT_JSON_LOG env var 2023-07-05 19:21:21 +01:00
Korcan Hussein 0b410a7119 a/bindings: Interaction profile inheritance
A requirement of interaction profile (extensions) specify that some/all
actions must be supported by all other profiles. This commit
modifies the binding generation to support data-inheritance in bindings.json:
* Adds support for profiles in bindings.json to inherit & override other profiles
* Adds a new concept of virtual profiles for profile like extensions
  (e.g. `XR_EXT_palm_pose`) which do not define a profile themselves but
  require their newly defined actions to be supported by all profiles.
* Generates verify bindings functions which only check extensions actions
  only if the extension is enabled.
2023-07-04 13:31:32 +00:00
Korcan Hussein 258357489c xrt: Add XRT_INPUT_GENERIC_PALM_POSE for XR_EXT_palm_pose 2023-07-04 13:31:32 +00:00
Korcan Hussein 18e367300c st/oxr: Add disabled XR_MSFT_hand_intertaction
The binding code has support for this extenstion, but the bindings are not
used in any of the drivers so totally untested and would lead to the wrong
expectations of the applications.
2023-07-04 13:31:32 +00:00
Korcan Hussein ba6c35e605 st/oxr: Add disabled XR_EXT_palm_pose
Disabled because no driver implements the needed pose.
2023-07-04 13:31:32 +00:00
Jakob Bornecrantz bf0015b8ab st/oxr: Send logging to OutputDebugStringA even if we aren't printing to stderr
This was intended all along, it's worse on Windows since we
don't by default print to stderr, so we never printed there.
2023-07-04 12:25:33 +00:00
Jarvis Huang a8df7dcb54 u/debug: Use system property on Android for debug settings
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-07-03 18:53:01 +00:00
Jakob Bornecrantz 2f3f533082 u/debug: Use getenv_s on Windows for debug settings 2023-07-03 18:53:01 +00:00
Jakob Bornecrantz 9a8d80c14d u/debug: Do not save pointer returned from getenv 2023-07-03 18:53:01 +00:00
Jakob Bornecrantz 8c8356840a u/debug: Tidy file and export more converters 2023-07-03 18:53:01 +00:00
Jakob Bornecrantz 8a303927b7 t/hand: Add env variables to control prediction 2023-07-01 16:40:35 +01:00
Jakob Bornecrantz 0a679fe3fd t/hand: Remove stale comment 2023-07-01 16:40:35 +01:00
Jakob Bornecrantz c78cc7f0ae t/hand: Tidy async file 2023-07-01 16:40:35 +01:00
Jakob Bornecrantz ca3631875c t/hand: Make all internal functions static 2023-07-01 16:40:35 +01:00
Jakob Bornecrantz c00ea720ff t/hand: Rename new user hand estimation switch 2023-07-01 16:40:35 +01:00
Jakob Bornecrantz 6bff970bcd tracking: Remove unused destroy function 2023-07-01 16:40:35 +01:00
Jakob Bornecrantz c6dda533d4 c/main: Add NorthStar to listed displays 2023-07-01 16:40:35 +01:00
Jakob Bornecrantz e8e9b99db4 c/main: Only wait on the main queue when drawing the frame
Do not wait on the full GPU.
2023-07-01 16:40:35 +01:00
Jakob Bornecrantz 96babf8fb6 d/vive: Set correct tracking origin type when we have slam 2023-07-01 15:54:51 +01:00
Jakob Bornecrantz fe5c215ed0 c/util: Refactor instance creation
Makes it check for required extensions before calling vkCreateInstance.
2023-07-01 14:10:34 +00:00
Jakob Bornecrantz 9adb5a566e a/vk: Add helper to check required Vulkan extensions 2023-07-01 14:10:34 +00:00
Jakob Bornecrantz 01a43534be a/vk: Refactor code to use two call helper to get instance extensions 2023-07-01 14:10:34 +00:00
Fernando Velazquez Innella 28ba6ed448 u/logging: Include newline char in Windows debug output 2023-06-30 16:54:18 -04:00
Korcan Hussein 2aed9184e6 st/oxr: Add disabled XR_HTCX_vive_tracker defines
Useful for various compiletime checks.
2023-06-29 00:50:26 +01:00
Korcan Hussein a8c5be8f5c st/oxr: Fix up Monado experimental extensions 2023-06-29 00:32:01 +01:00
Korcan Hussein 230c059d27 a/bindings: Correct ML2 controller extension name 2023-06-29 00:32:01 +01:00
Korcan Hussein 8865baafee xrt: Plumbs enabled ext state for XR_EXT_eye_gaze_interaction 2023-06-29 00:31:58 +01:00
Jakob Bornecrantz 67a8147c09 d/dai: Try to set realtime priority on IMU thread 2023-06-27 18:52:58 +00:00
Jakob Bornecrantz 1b221c7666 d/vive: Try to set realtime priority on sensors thread 2023-06-27 18:52:58 +00:00
Jakob Bornecrantz cc263e2579 d/wmr: Try to set realtime priority on USB thread 2023-06-27 18:52:58 +00:00
Jakob Bornecrantz 0d6d42041f c/multi: Try to set realtime priority on main thread 2023-06-27 18:52:58 +00:00
Jakob Bornecrantz cd10b487e2 u/linux: Add helpers to raise thread scheduling priority 2023-06-27 18:52:58 +00:00
Jakob Bornecrantz 064da71894 c/util: Track and free native sync handle from semaphore
The layer above IPC & st/oxr doesn't consume this handle, instead it has dup
semantics, so we need to keep track of the handle and free it once done.
2023-06-26 20:37:09 +01:00
Jakob Bornecrantz 6493564024 c/util: Only destroy valid VkSemaphore handles 2023-06-26 20:32:27 +01:00
utzcoz e0433b4e09 c/main: Use vk_cmd_submit_locked in vk_helper to simply peek logic
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-06-23 18:40:54 +08:00
Christoph Haag e61adde115 st/oxr: Check argument validity in time conversion function
Affected OpenXR functions: xrConvertWin32PerformanceCounterToTime
2023-06-22 20:12:08 +01:00
Ryan Pavlik b95a5029a5 a/util: Fix clang tidy warnings in logging code 2023-06-22 19:07:44 +00:00
Jakob Bornecrantz 552b01df9e c/util: Name all fence objects 2023-06-22 20:01:24 +01:00
Jakob Bornecrantz 7322918e51 c/main: Name all fence objects 2023-06-22 20:01:24 +01:00
Jakob Bornecrantz 46998fa1d1 c/main: Optionally enable VK_EXT_debug_marker on debug builds 2023-06-22 19:55:48 +01:00
Jakob Bornecrantz 47ba88a78a a/vk: Name all fence objects 2023-06-22 19:55:48 +01:00
Jakob Bornecrantz 2c60a087e9 a/vk: Add function to name object 2023-06-22 19:55:48 +01:00
Jakob Bornecrantz b5a882480b a/vk: Add VK_EXT_debug_marker 2023-06-22 19:55:48 +01:00
Jakob Bornecrantz e466551db0 st/oxr: Use common helper versions of truncating Xprintf 2023-06-21 22:05:14 +00:00
Jakob Bornecrantz b33e65698a u/logging: Refactor logging printing functions 2023-06-21 22:05:14 +00:00
Jakob Bornecrantz d13f59f6f9 u/logging: Truncate hexdump at 16MB 2023-06-21 22:05:14 +00:00
Jakob Bornecrantz 7ef4a21dca u/logging: Tidy c file [NFC] 2023-06-21 22:05:14 +00:00
Jakob Bornecrantz 200f1b11ca u/truncate_printf: Add truncating helpers 2023-06-21 22:05:14 +00:00
Linus Lüssing 5340e1fa6b d/wmr: reduce Original/Odyssey controller drift by applying biases
Similar to the HP Reverb G2 controllers apply the biases
provided by their calibration data.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2023-06-18 12:42:14 +02:00
Linus Lüssing 8a239623d7 d/wmr: reduce drifting by applying calibration biases to G2 controllers
For one thing this applies the calibrated gyro and acceleromater bias
provided by the Reverb G2 controllers via the WMR protocol to
to the according sensor values of the controller. For another,
this applies the temperature mixing matrix in the same, partial way as
it is applied to the HMD. That is it currently disregards the polynomial
coefficiency nature - which is okay for the Reverb G2 as any temperature
dependant, non-constant coefficients in the mixing matrix seem to always
be 0 in the calibration data for it.

All this is, in theory, to reduce drifting. However for the Reverb G2 it
did not eliminate it completly, seemingly like for the HMD the
controllers were never temperature calibrated (controllers and HMD use
the same TDK/InvenSense ICM-20602 chip).

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2023-06-18 12:42:14 +02:00
Jakob Bornecrantz f5eaecc690 t/ctl: Use common IPC connection code 2023-06-17 22:25:16 +01:00
Ryan Pavlik 2c2aa92889 ipc: Factor out client connection setup and teardown for reuse. 2023-06-17 22:23:33 +01:00
Linus Lüssing c5fa0e02e8 d/wmr: fix Original/Odyssey controller orientation
Similar to the HP Reverb G2 controllers apply the rotations
provided by their calibration data.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2023-06-17 18:08:46 +01:00
Linus Lüssing 57fb867514 d/wmr: fix Reverb G2 controller orientation
We can't take the IMU values of the Reverb G2 controller as is.
We need to compensate for how the IMU chip is oriented on the
hardware.

Similar to the WMR HMD the WMR controllers' firmware configuration
provides us with the transformations necessary to adjust the
controller orientations. So apply them to fix the orientation
issues.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2023-06-17 18:08:46 +01:00
Linus Lüssing c95be33072 d/wmr: make sensor transform precomputations reuseable
Not only the sensor values from the HMD need to be transformed from WMR
to OpenXR but also the sensor values from the controllers. Therefore
restructuring the according code to be useable by both the WMR HMD and
WMR controller code.

No functional changes.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2023-06-17 18:08:46 +01:00
Fernando Velazquez Innella 62dff3401c c/client: Wait till D3D12 images aren't in use before releasing the swapchain
This adds a fence signal + CPU wait on the compositor queue before destroying
the swapchain. It fixes a crash in the OpenXR CTS automated tests for D3D12.
2023-06-17 14:15:00 +01:00
utzcoz 0224e97532 st/oxr: Fix simple typo for comments [NFC]
grahpics->graphics

Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-06-17 12:51:33 +01:00
Ryan Pavlik 3f644f9f88 st/oxr: clang-tidy fixes 2023-06-17 11:46:14 +01:00
Ryan Pavlik fe6e87b4a7 c/util: Clang tidy fixes 2023-06-17 11:46:14 +01:00