Commit graph

5718 commits

Author SHA1 Message Date
Jakob Bornecrantz a339d7adf4 ipc: Remove unused function [NFC] 2023-11-13 12:47:12 +00:00
Michael Graham 255b62e892 d/wmr: Add Dell Visor support to WMR driver 2023-11-13 11:56:13 +00:00
Jakob Bornecrantz cec787ba0f ipc: Add variable number of views get function 2023-11-09 18:37:47 +00:00
Jakob Bornecrantz 7251417569 ipc: Add functions to lock/unlock the client connection 2023-11-09 17:56:27 +00:00
Jakob Bornecrantz e576424995 ipc: Add ability to do variable length calls 2023-11-09 17:56:27 +00:00
Jakob Bornecrantz 6d990ba480 ipc: Refactor proto generation a little bit 2023-11-09 17:49:35 +00:00
Zhongwang Zhang d6168fdbb4 st/oxr: Add KHR_vulkan_enable rdc capture support 2023-11-09 13:45:48 +00:00
Zhongwang Zhang e328c42121 st/oxr: RenderDoc support on Vulkan/GLES client sides and Android platform
Makes it so RenderDoc can be captured by the button in UI.
2023-11-09 13:45:48 +00:00
Zhongwang Zhang b1aedcf1d5 st/oxr: Enable VK_EXT_debug_utils extension for client side on the platform that support it 2023-11-09 13:45:48 +00:00
Zhongwang Zhang aadb9517f3 st/oxr: Enable RenderDoc compiling on Android 2023-11-09 13:45:48 +00:00
Zhongwang Zhang f93d08c7f5 c/client: Add renderdoc_enabled implementation for VK and EGL
Currently only used on Android platforms.
2023-11-09 13:45:48 +00:00
Zhongwang Zhang 23595274ee c/client: Allow passing down debug_utils_enabled flag 2023-11-09 13:45:48 +00:00
Zhongwang Zhang 3dde1f2d27 a/vk: Enable VK_EXT_debug_utils to be enabled in given 2023-11-09 13:45:48 +00:00
Zhongwang Zhang 51690cf20e a/vk: Add RenderDoc helpers
Adds helper for inserting frame delimiter.
2023-11-09 13:45:48 +00:00
Zhongwang Zhang 017e2b2f29 xrt: Enable passing down renderdoc status 2023-11-09 13:45:43 +00:00
Zhongwang Zhang 0f257e1bed xrt: Enable passing down VK_EXT_debug_utils enabled status 2023-11-09 13:45:23 +00:00
Jarvis Huang 9e913b5a31 c/main: Support creating surface with title on Android 2023-11-08 17:51:29 +00:00
Jarvis Huang 4f90666b75 external: Update android-jni-wrap 2023-11-08 17:51:24 +00:00
Jakob Bornecrantz 60bbded2e2 ipc: Remove left over static roles 2023-11-07 22:57:44 +00:00
Jakob Bornecrantz f1d275708d libmonado: Fix dynamic roles 2023-11-07 22:57:44 +00:00
Jakob Bornecrantz 14d94d8d9a t/common: Fix North Star builder
Closes #296
2023-11-07 22:51:27 +00:00
Ryan Pavlik 51fa07cfd6 xrt: Better documentation for revised system devices/roles interface 2023-11-07 22:36:58 +00:00
Weijie Wang fdfe2fc459 ipc: Increase the duration of the starting timeout 2023-11-06 15:40:23 +00:00
Jakob Bornecrantz 5da1086d26 a/vk: Name VkInstance once we have the needed VkDevice
Note this is currently disabled due to bugs in Vulkan Loader / Mesa.
2023-11-06 12:59:09 +00:00
Jakob Bornecrantz e84d47400e a/vk: Disable naming of VkDescriptorSet objects
Mesa RADV leaks the names on descriptor pools we use reset on.
2023-11-06 12:59:07 +00:00
Jakob Bornecrantz e7bb70909f a/vk: Disable naming of VkSurfaceKHR objects
Causes crashes and asserts on Ubuntu 22.04 Mesa.
2023-11-06 12:58:22 +00:00
Jakob Bornecrantz 3f0d95d71f a/vk: Disable naming of VkInstance objects
Mesa as of this patch doesn't currectly support setting debug names on
VkInstance. And the Vulkan loader had a bug before 1.3.261 that would cause
crashes if trying to set the name on VkInstance.

faeb94c2df
2023-11-06 12:56:55 +00:00
Jakob Bornecrantz 2aa00dbf8f a/vk: Add VK_NAME_OBJ_DISABLED helper 2023-11-04 17:03:02 +00:00
Jakob Bornecrantz bb87f54730 a/vk: Make VK_NAME_OBJECT type safe 2023-11-04 17:02:56 +00:00
Jakob Bornecrantz e84ad85fc2 a/vk: Add object type to string helper 2023-11-04 15:04:26 +00:00
Jakob Bornecrantz 5b9e70f3a8 c/render: Fix named objects 2023-11-03 21:23:35 +00:00
Jakob Bornecrantz 70548ee0e9 t/common: Refactor lighthouse builder to use vive_builder helper 2023-11-03 19:14:43 +00:00
Jakob Bornecrantz be1b4ba5a6 a/vive: Add builder helper 2023-11-03 19:14:43 +00:00
Jakob Bornecrantz 332b32b71f ipc: Refactor and tidy client connection
Also move git hash check as early as possible.
2023-11-03 18:18:31 +00:00
Jakob Bornecrantz bfffb0c5c4 ipc: Constify client connection argument 2023-11-03 18:18:31 +00:00
Simon Zeni e67f9d7e52 a/vk: Name Vulkan objects 2023-11-03 16:26:56 +00:00
Simon Zeni 7cba92e933 c/util: Name Vulkan objects 2023-11-03 16:26:56 +00:00
Simon Zeni 2a513c14fe c/render: Name Vulkan objects 2023-11-03 16:26:56 +00:00
Simon Zeni 38be815f6d c/client: Name Vulkan objects 2023-11-03 16:26:56 +00:00
Simon Zeni c75db60478 c/main: Name Vulkan objects 2023-11-03 16:26:56 +00:00
Jakob Bornecrantz b90c397997 c/main: Tidy window surface creation code 2023-11-03 16:04:36 +00:00
Simon Zeni 4a1ff65856 a/vk: Remove VK_EXT_debug_marker 2023-11-03 16:04:36 +00:00
Simon Zeni c7dc483b9a a/vk: Use VK_EXT_debug_utils to name objects 2023-11-03 16:04:36 +00:00
Jakob Bornecrantz 91d4e399c8 a/vk: Add VK_EXT_debug_utils 2023-11-03 16:04:36 +00:00
Mateo de Mayo 347ae3ce22 t/slam: Use locks for CSV writers
Fixes a race condition that produced weirdly written csv files.
2023-11-02 21:34:05 +00:00
Mateo de Mayo 28b097338b t/slam: Add CSVWriter class 2023-11-02 21:34:05 +00:00
Jakob Bornecrantz 05d04b3ea0 ipc: Fix compile on musl 2023-11-02 15:06:02 +00:00
Hui Xu 7c6b0d1e98 ipc: Add macro TEMP_FAILURE_RETRY
- to ignore the signal -4 (ENTR)
2023-11-02 14:25:21 +00:00
Jarvis Huang 2e41280ae9 st/oxr: Route log output to Android logcat 2023-10-31 19:31:26 +00:00
Simon Zeni 9b288a6a1a c/[util/shader]: Implement cylinder layer for compute renderer 2023-10-28 19:50:58 +01:00
Simon Zeni 31cde143a1 c/[util/shaders]: Implement equirect2 layer for compute render 2023-10-28 19:47:51 +01:00
Simon Zeni ec26005952 c/shaders: Use fma in compute shader 2023-10-28 19:47:51 +01:00
Simon Zeni c4251cb907 c/util: Replace is_view_index_visible helper by is_layer_view_visible 2023-10-28 19:47:51 +01:00
BabbleBones 3aa2386950 d/steamvr_lh: handle unknown role hints 2023-10-25 23:27:30 -04:00
BabbleBones d5eeb65af9 d/steamvr_lh: clean up logs and clean up unused tracker inputs 2023-10-25 23:27:30 -04:00
BabbleBones 940a0290ea d/steamvr_lh: fix vive wand early hand enumeration 2023-10-25 23:27:30 -04:00
Jakob Bornecrantz 2f586030be t/common: Fix Rift-S builder 2023-10-25 14:34:55 +01:00
Jakob Bornecrantz cbf26357d1 c/client: Add helpers to unwrap native swapchains and compositors 2023-10-24 14:07:43 +00:00
Jakob Bornecrantz d0617c04d5 c/render: Remove old layer render shaders 2023-10-24 12:33:05 +00:00
Jakob Bornecrantz 2245811d1e c/main: Remove layer renderer 2023-10-24 12:33:05 +00:00
Jakob Bornecrantz 3293def0cb c/main: Remove layer renderer integration in renderer 2023-10-24 12:33:05 +00:00
Jakob Bornecrantz 958d62fcab c/main: Remove old graphics dispatch helpers 2023-10-24 12:33:05 +00:00
Jakob Bornecrantz 3dcd555a6f c/main: Use new comp_render helpers to render frame 2023-10-24 12:33:05 +00:00
Jakob Bornecrantz c5f4f0ab7a xrt: Remove old roles
Also remove all fallbacks helpers now.
2023-10-24 09:24:49 +00:00
Jakob Bornecrantz 1d476d4e32 st/oxr: Update role debug printing 2023-10-24 09:24:49 +00:00
Nico Marniok 5e48d22ecd st/oxr: Add input device hot-switch support
Co-authored-by: Korcan Hussein <korcan.hussein@collabora.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-10-24 09:24:49 +00:00
Korcan Hussein f60ffe5af7 st/oxr: Clone profiles to session on action sets attachment.
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-10-24 09:24:49 +00:00
Korcan Hussein d033955678 st/steamvr_drv: Add support for new dynamic device roles 2023-10-24 09:24:49 +00:00
Korcan Hussein 60ae73f571 ipc: Add support for dynamic device roles 2023-10-24 09:24:49 +00:00
Jakob Bornecrantz 5a38cbc4f0 st/prober: Add support for new dynamic device roles 2023-10-24 09:24:49 +00:00
Jakob Bornecrantz f6b1cc140d t/cli: Add support for new dynamic device roles 2023-10-24 09:24:49 +00:00
Jakob Bornecrantz 9331c8bb0a t/common: Add support for new dynamic device roles 2023-10-24 09:24:49 +00:00
Jakob Bornecrantz 2c49c0f9a7 t/sdl_test: Add support for new dynamic device roles 2023-10-24 09:24:49 +00:00
Jakob Bornecrantz dcdf270d13 d/remote: Add support for new dynamic device roles
Currently static.
2023-10-24 09:24:49 +00:00
Jakob Bornecrantz ccf6a4c8e3 u/system_helpers: Add static system device helper
As compared to one that can handle dynamic devices.
2023-10-24 09:24:49 +00:00
Nico Marniok 2718f0506e xrt: Add dynamic roles to xrt_system_devices
Doesn't fully remove the old way yet.

Co-authored-by: Korcan Hussein <korcan.hussein@collabora.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-10-24 09:24:49 +00:00
Jakob Bornecrantz d266b8d65a c/util: Add cylinder and equirect2 in graphics layer squasher
Co-authored-by: Simon Zeni <simon.zeni@collabora.com>
Co-authored-by: Charlton Rodda <charlton.rodda@collabora.com>
2023-10-23 22:20:41 +01:00
Jakob Bornecrantz 669e37220c c/util: Add to_tangent for view state 2023-10-23 22:20:41 +01:00
Simon Zeni 0d0addca82 c/util: Add calc_mv_inv_full function
Co-authored-by: Charlton Rodda <charlton.rodda@collabora.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-10-23 22:20:41 +01:00
Simon Zeni 38f1b35ac0 c/util: Compute eye and world inverse view matrix
Co-authored-by: Charlton Rodda <charlton.rodda@collabora.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2023-10-23 22:20:41 +01:00
Jakob Bornecrantz 2c2cacc8f1 c/util: Add mathinclude 2023-10-23 22:20:41 +01:00
Jakob Bornecrantz 3b174b0dab c/render: Add cylinder and equirect2 shaders
Co-authored-by: Simon Zeni <simon.zeni@collabora.com>
Co-authored-by: Charlton Rodda <charlton.rodda@collabora.com>
2023-10-23 22:20:41 +01:00
Jakob Bornecrantz 505a54bf8f c/render: Make UBO one shared layout available to fragment shader as well 2023-10-23 21:56:58 +01:00
Charlton Rodda f4980d35ea c/render: Fix typos [NFC] 2023-10-23 21:56:58 +01:00
Gabriele Boccone ce90c0a1c7 t/common: Fix creation on no driver available
Only say we can create a system if we have a driver in legacy builder.
2023-10-23 19:52:19 +01:00
Gabriele Boccone b500272c0b st/prober: Quit without crashing if no driver is available 2023-10-23 19:51:44 +01:00
Zhongwang Zhang 85fcbfaefe c/client: Make vulkan log configurable 2023-10-20 14:18:30 +01:00
Christoph Haag ef47498137 ipc: Fix session deactivation negative array index access
It is possible for s->global_state.active_client_index to be -1 when
update_server_state_locked is called:

ipc_server_activate_session is only called from
ipc_handle_compositor_predict_frame, which is only called from
ipc_compositor_wait_frame.

So it is possible to deactivate a session that was never activated.
2023-10-19 15:37:01 +02:00
Jakob Bornecrantz eee17ee2ff u/builders: Refactor space overseer creation helper 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz e805209fcd d/opengloves: Refactor creation 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz 8b30819b35 t/common: Refactor WinMR builder [NFC] 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz 0a8fa312d6 t/common: Refactor SimulaVR builder [NFC] 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz 201ea799ac t/common: Refactor Simulated builder [NFC] 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz fb8c941257 t/common: Refactor Rift-S builder [NFC] 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz 09c75b6aaf t/common: Refactor RGB builder [NFC] 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz 841fc7c644 t/common: Refactor QWERTY builder [NFC] 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz d9329d1c7c t/common: Refactor Nreal Air builder [NFC] 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz 9a27a32b9c t/common: Refactor North Star builder [NFC] 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz 1d8bfc7532 t/common: Refactor Lighthouse builder [NFC] 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz d2ceb81070 t/common: Refactor Legacy builder [NFC] 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz e58926662f t/common: Don't destroy frame context on failure
This is handled later in the builder.
2023-10-19 11:28:22 +01:00
Jakob Bornecrantz 0b9a8ea860 t/common: Return error message proper failure in legacy builder 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz 08ec4e0259 u/system_helpers: Refactor hand-tracker helper getters 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz 464a95abed u/system_helpers: Tidy functions [NFC] 2023-10-19 11:28:22 +01:00
Jakob Bornecrantz 3184941c09 d/rs: Fix warnings [NFC] 2023-10-18 17:30:00 +01:00
Jakob Bornecrantz f5021dcf5a d/nreal_air: Silence warning [NFC] 2023-10-18 17:30:00 +01:00
Jakob Bornecrantz 8110fceb39 d/nreal_air: Tidy [NFC] 2023-10-18 17:28:24 +01:00
Jiali Zhang 8f70291cad c/client: Expose size limit for swapchains 2023-10-18 15:20:26 +01:00
Jiali Zhang 900c43a6e2 st/oxr: Verify max swapchain size 2023-10-18 15:14:21 +01:00
Jiali Zhang bbb1de1b0f xrt: Add size limit for swapchain 2023-10-18 15:14:21 +01:00
Jakob Bornecrantz 93f1c0e288 st/oxr: Refactor device role getters 2023-10-13 17:12:23 +01:00
Korcan Hussein 44a2562acd st/oxr: Increase use of action ref in binding code
Make `oxr_action_attachment_bind` only use `oxr_action_ref` params.
2023-10-13 17:12:23 +01:00
Jakob Bornecrantz 1a720c4814 c/util: Add graphics render helpers 2023-10-13 01:15:20 +01:00
Jakob Bornecrantz 8427a33196 c/util: Rename render compute file 2023-10-13 00:45:20 +01:00
Jakob Bornecrantz 0bbbd1b507 c/util: Refactor out render helpers to header 2023-10-13 00:45:20 +01:00
Jakob Bornecrantz b97ca79b5e c/util: Prefix compute helpers with cs 2023-10-13 00:45:20 +01:00
Jakob Bornecrantz 8f7c58e70a c/render: Add graphics layer rendering code 2023-10-13 00:45:20 +01:00
Jakob Bornecrantz 73639f7b37 c/render: Add graphics layer shaders 2023-10-13 00:45:20 +01:00
Jakob Bornecrantz bcccfc2f21 c/render: Make it possible to set clear colour when starting render pass 2023-10-13 00:45:20 +01:00
Jakob Bornecrantz a9cdba2ce5 c/main: Enable timewarp for gfx fast path 2023-10-10 15:33:57 +01:00
Jakob Bornecrantz 4a8a36f620 c/render: Enable timewarp to be used on mesh shader 2023-10-10 15:33:57 +01:00
Jakob Bornecrantz 899f02e17c c/render: Add timewarp to mesh shader
Currently disabled.
2023-10-10 15:33:57 +01:00
Jakob Bornecrantz 52b93a5a29 c/render: Make ubo upload and descriptor setting shareable 2023-10-10 14:33:07 +00:00
Jakob Bornecrantz 8ce3971fe9 c/render: Make descriptor layout creation function shareable 2023-10-10 14:33:07 +00:00
Jakob Bornecrantz 5bc9ff8f13 c/render: Make gfx descriptor pool shareable 2023-10-10 14:33:07 +00:00
Jakob Bornecrantz 89c99de598 c/render: Remove unused render_gfx_view and other fields on render_gfx 2023-10-10 14:33:07 +00:00
Jakob Bornecrantz ff51653ffd c/render: Refactor gfx mesh shader allocation and dispatch 2023-10-10 14:33:07 +00:00
Jakob Bornecrantz 93272b684c a/math: Add projection matrix making function 2023-10-10 14:30:48 +00:00
Jakob Bornecrantz 11fba8d79f a/math: Add missing files to CMakeLists.txt [NFC] 2023-10-10 14:30:48 +00:00
Jakob Bornecrantz ae31778032 a/math: Add missing C declaration specifier [NFC] 2023-10-10 14:30:48 +00:00
Jakob Bornecrantz 50b5e6445e a/math: Organize base and api file [NFC] 2023-10-10 14:30:48 +00:00
BabbleBones 238647d7e1 d/steamvr_lh: Add tundra as generic tracker 2023-10-09 22:03:17 -04:00
Jakob Bornecrantz d1ce6c15ac c/render: Use sub-allocation for mesh shader UBOs 2023-10-06 15:21:12 +01:00
Jakob Bornecrantz 06ddfe32df c/render: Add scaffolding for sub-allocating UBOs 2023-10-06 15:21:12 +01:00
Jakob Bornecrantz 00891b3452 c/render: Add simple sub-allocation code 2023-10-06 15:21:12 +01:00
Jakob Bornecrantz 0b7deed16f u/system_helpers: Make system devices easier to embed 2023-10-06 14:51:48 +01:00
Jakob Bornecrantz 77efa57e0a c/render: Make library usable on it's own in cmake 2023-10-05 12:47:51 +01:00
Jakob Bornecrantz ace0ca62c6 c/render: Expose uv to tangent lengths function
Also document it better.
2023-10-05 12:47:51 +01:00
Jakob Bornecrantz 975ca891c3 c/render: Refactor gfx distortion dispatch 2023-10-05 12:47:51 +01:00
Jakob Bornecrantz 996195f544 c/main: Refactor gfx dispatch 2023-10-05 12:47:51 +01:00
Jakob Bornecrantz b7dbdae304 c/main: Refactor vertex rot getting in renderer 2023-10-05 12:47:51 +01:00
Jakob Bornecrantz c81356e0c8 c/main: Refactor view poses getting in renderer 2023-10-05 12:47:51 +01:00
Jakob Bornecrantz 0362834904 c/main: Tidy layer headers 2023-10-05 12:47:51 +01:00
Jakob Bornecrantz 05a9617874 c/util: Fix timewarp logic being inverted for fast path 2023-10-04 16:28:38 +01:00
Jakob Bornecrantz 87b3b2ea5a c/render: Constify arguments [NFC] 2023-10-04 01:04:03 +01:00
Jakob Bornecrantz b5a9300479 c/render: Tidy header includes in shaders [NFC] 2023-10-04 01:04:03 +01:00
Jakob Bornecrantz ae3cf44263 c/render: Refactor shader loading define [NFC] 2023-10-04 01:04:03 +01:00
Jakob Bornecrantz 6e7a0a621c c/render: Use define helpers in gfx code 2023-10-04 01:04:03 +01:00
Jakob Bornecrantz b8a226bf7b c/render: Use define helpers in buffer code 2023-10-04 01:04:03 +01:00
Jakob Bornecrantz 78a638a6cd c/render: Use define helpers in shaders code 2023-10-04 01:04:03 +01:00
Jakob Bornecrantz f468e124c2 c/render: Use define helpers in compute code 2023-10-03 21:51:03 +00:00
Jakob Bornecrantz c93f0d75d8 c/render: Use define helpers in resources code 2023-10-03 21:51:03 +00:00
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