Commit graph

3987 commits

Author SHA1 Message Date
Moses Turner af5516f4b6 d/dai: We didn't need this calibration struct for anything 2022-05-10 23:47:30 +01:00
Moses Turner e25ee4058d xrt: Remove xrt_tracked_hand 2022-05-10 18:53:58 +01:00
Christoph Haag 71c7ec2382 c/main: Add thread waiting for vblank events
Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2022-05-10 11:22:51 +01:00
Jakob Bornecrantz e140cfad5c u/pacing: Add vblank timing function for display control 2022-05-10 11:22:04 +01:00
Jakob Bornecrantz 57070ad620 u/pacing: Make the comp time be at least 2ms in fake pacer 2022-05-10 11:18:52 +01:00
Jakob Bornecrantz b9b9ced43d u/pacing: Predict present time and then calculate display time in fake pacer 2022-05-10 11:18:52 +01:00
Jakob Bornecrantz 6c9c1e9249 u/pacing: Make present_to_display_offset_ns more clear 2022-05-10 11:18:51 +01:00
Jakob Bornecrantz e93b1c61ff st/oxr: Make VK_KHR_external_[fence|semaphore]_fd optional
Only for XR_KHR_vulkan_enable2, harder to do for XR_KHR_vulkan_enable.
2022-05-09 14:01:20 +00:00
Jakob Bornecrantz 8945153bc9 st/oxr: Work around clang-format (NFC) 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz c6b0089c51 xrt: Pass external_[fence|semaphore]_fd status in 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz 989c4334a3 c/client: Pass external_[fence|semaphore]_fd status in 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz c8de67ad94 c/main: Make VK_KHR_external_[fence|semaphore]_fd optional 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz cd018c98f8 c/main: Work around clang-format (NFC) 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz fd35f6668a c/util: Print device info as well 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz 2b042d48ff a/vk: Add function to print opened device info 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz 6c61965790 a/vk: Tidy vk_print_device_info 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz e092a3687b a/vk: Pass external_[fence|samaphore]_fd status to vk_init_from_given 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz 6a8e679f87 a/vk: Check for VK_KHR_external_fence_fd and VK_KHR_external_semaphore_fd 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz 308aeb8e21 a/vk: Sort checked extensions 2022-05-09 14:01:20 +00:00
Jakob Bornecrantz 759162ebeb ipc: Return correct status if we fail to create a semaphore 2022-05-09 14:01:20 +00:00
Christoph Haag 2064fd8721 c/main: zero initialize xrt_system_compositor_info
Fixes valgrind warning

==354193== Thread 39:
==354193== Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised byte(s)
==354193==    at 0xC0A146D: sendmsg (in /usr/lib/libc.so.6)
==354193==    by 0x18527D: ipc_send (src/xrt/ipc/shared/ipc_utils.c:65)
==354193==    by 0x157771: ipc_dispatch (ipc_server_generated.c:165)
==354193==    by 0x15C88D: client_loop (src/xrt/ipc/server/ipc_server_per_client_thread.c:112)
==354193==    by 0x15C60C: ipc_server_client_thread (src/xrt/ipc/server/ipc_server_per_client_thread.c:183)
==354193==    by 0xC01A5C1: start_thread (in /usr/lib/libc.so.6)
==354193==    by 0xC09F583: clone (in /usr/lib/libc.so.6)
==354193==  Address 0xc0866afc is on thread 39's stack
==354193==  in frame #2, created by ipc_dispatch (ipc_server_generated.c:23)
==354193==  Uninitialised value was created by a stack allocation
==354193==    at 0x15F830: xrt_gfx_provider_create_system (src/xrt/compositor/main/comp_compositor.c:1118)
2022-05-09 15:53:25 +02:00
Christoph Haag f76b31795f ipc: zero initialize message buffer 2022-05-09 15:53:00 +02:00
Jakob Bornecrantz a24551b24b c/main: Refactor image count selection 2022-05-09 10:57:05 +00:00
Jakob Bornecrantz 9b8fe97ba9 c/main: Remove pre-declared function declarations
Split in two commits to improve git diff for previous commit.
2022-05-09 10:57:05 +00:00
Jakob Bornecrantz c052b856cf c/main: Refactor comp_target_swapchain to not pre-declare any internal functions 2022-05-09 10:57:05 +00:00
Jakob Bornecrantz 41cb0bc2e3 c/main: Whitespace in comp_target_swapchain 2022-05-09 10:57:05 +00:00
Jakob Bornecrantz 35e7a7c6ff c/main: Fix copy typo 2022-05-09 10:57:05 +00:00
Jakob Bornecrantz 6b19eedf9c d/survive: Use shared bindings 2022-05-09 10:46:44 +00:00
Jakob Bornecrantz 456f9c7f09 d/vive: Use shared bindings 2022-05-09 10:46:44 +00:00
Jakob Bornecrantz 56b77248c9 a/vive: Add bindings to touch controller 2022-05-09 10:46:44 +00:00
Jakob Bornecrantz 7d4b19766c a/vive: Add bindings 2022-05-09 10:46:44 +00:00
Jakob Bornecrantz 8cf120a6f2 c/render: Fix comment (NFC) 2022-05-08 10:09:07 +01:00
Jakob Bornecrantz d2f2a06e91 c/render: Use query pool to measure GPU time 2022-05-08 10:09:07 +01:00
Jakob Bornecrantz 6d02d67f78 c/main: Ask for VK_EXT_calibrated_timestamps if available 2022-05-08 10:09:07 +01:00
Jakob Bornecrantz c4f0e17e88 c/main: Setting logging level when checking vulkan caps 2022-05-08 10:09:07 +01:00
Christoph Haag 611a0f644d c/main: Use at least 3 vk images for comp target swapchain if supported 2022-05-08 10:09:07 +01:00
Mateo de Mayo 1a687cdee4 d/wmr: Add initial hand tracking for WMR devices
Co-authored-by: Moses Turner <moses@collabora.com>
2022-05-07 15:53:56 +00:00
Mateo de Mayo 7e1f9a7964 t/hand: Add option for allowing xfctx to be managed externally
Other trackers (e.g., psmv, slam, etc) work as sinks and the xfctx that manages
them is handled by the device providing the data streams. This change helps
the hand tracker have a more similar interface to other trackers.
2022-05-07 15:53:56 +00:00
Mateo de Mayo 44dac0eb5d d/wmr: Refactor UI and tracker initialization into their own methods (NFC) 2022-05-07 15:53:56 +00:00
Mateo de Mayo e3fadb5364 doc: Fix some doxygen warnings 2022-05-07 15:53:56 +00:00
Ryan Pavlik bcdc2416a7 cmake: Adjust deps of XRT_INSTALL_*_SYSTEMD_*
Value may be ignored in this repo without the service target,
but it's harmless to have it on, and more flexible to build on.
2022-05-06 14:30:49 -05:00
Ryan Pavlik ccbb658e49 st/oxr: Fix renderdoc build on Windows. 2022-05-06 13:59:24 -05:00
Ryan Pavlik e79a13f0ac a/util: Fix log corruption on Windows. 2022-05-06 00:26:39 +01:00
Ryan Pavlik dd6b0debd0 c/main: Populate LUID in xrt_system_compositor_info 2022-05-06 00:26:34 +01:00
Ryan Pavlik f958091578 st/oxr: Fix vulkan luid logging 2022-05-06 00:26:34 +01:00
Ryan Pavlik 422666efb3 cmake: Hide some warnings on external code. 2022-05-04 11:24:02 -05:00
Ryan Pavlik 3287c984aa cmake: Reorganize options, renaming some.
Rename XRT_HAVE_SLAM to XRT_FEATURE_SLAM,
moving it from xrt_config_have.h to xrt_config_build.h
accordingly.
2022-05-04 11:24:02 -05:00
Ryan Pavlik 097eeb4f29 cmake: Switch to a new way of setting options more in line with expectations.
If you explicitly request an option, and it's not available due to dependencies,
we now error out instead of silently changing the value.
2022-05-04 11:24:02 -05:00
Jakob Bornecrantz 38f68dc104 xrt: Use xrt_luid_t for deviceLUID 2022-05-04 15:11:24 +00:00
Jakob Bornecrantz b62d871498 xrt: Add xrt_luid_t 2022-05-04 15:11:24 +00:00
Jakob Bornecrantz 4ba23faa6b auxiliary: Deal with clang-format-14 fallout (NFC) 2022-05-04 15:58:01 +01:00
Jakob Bornecrantz 45ba6ff1b1 c/client: Add support for xrt_swapchain_create_properties 2022-05-04 15:51:34 +01:00
Jakob Bornecrantz a36620fad3 ipc: Use xrt_swapchain_create_properties when using XINA 2022-05-04 15:51:16 +01:00
Jakob Bornecrantz 6805b40ac2 ipc: Add support for xrt_swapchain_create_properties 2022-05-04 15:50:54 +01:00
Jakob Bornecrantz f78f334473 c/multi: Add support for xrt_swapchain_create_properties 2022-05-04 15:50:20 +01:00
Jakob Bornecrantz dd1da49aa5 c/base: Add support for xrt_swapchain_create_properties 2022-05-04 15:50:00 +01:00
Jakob Bornecrantz 07fe47d053 xrt: Add xrt_swapchain_create_properties and related function 2022-05-04 15:48:57 +01:00
Moses Turner a5024060eb d/dai: Autodetect OAK-D vs OAK-D Lite
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2022-05-04 13:43:43 +00:00
Ryan Pavlik 3f9e5c2a30 st/steamvr_drv: Guard GNU pragmas 2022-05-03 22:45:05 +01:00
Ryan Pavlik fedb4fd413 t/steamvr_drv: Adjust ifdef 2022-05-03 22:44:46 +01:00
Ryan Pavlik fc9fba9ab2 st/oxr: Adjust ifdef 2022-05-03 22:44:46 +01:00
Ryan Pavlik f9b4af04e4 a/tracking: Fix conversion warnings 2022-05-03 22:44:37 +01:00
Ryan Pavlik d8970f25f9 a/math: Fix conversion warnings 2022-05-03 22:44:28 +01:00
Ryan Pavlik 32a893fd2b st/oxr: Grab LUID from Vulkan if possible 2022-05-03 22:39:58 +01:00
Ryan Pavlik 49c45bf16a c/main: Store LUID 2022-05-03 22:34:47 +01:00
Ryan Pavlik 63fdadae3f c/util: Query GPU LUID when possible 2022-05-03 22:33:57 +01:00
Ryan Pavlik 3691d881fc xrt: Adjust includes for intrinsics on Windows/msvc 2022-05-03 22:33:57 +01:00
Ryan Pavlik 14f37dbe4c xrt: Add GPU LUID to xrt_system_compositor_info 2022-05-03 22:32:17 +01:00
Jakob Bornecrantz 96fbb1e59a c/client: Print the EGL return when failing to set context 2022-05-03 15:20:19 +00:00
Jakob Bornecrantz e791f3ea2f d/android: Fix various bugs 2022-05-03 14:22:34 +00:00
Ryan Pavlik 7a039543d1 st/prober: We want to support HID devices 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz dbb0461db4 st/prober: Tidy 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz d6dcba29ed st/oxr: Tidy 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 05d186083a st/gui: Fix conversion warnings 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz f8bce0b213 st/oxr: Fix conversion warnings 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 243c2e5326 d/psvr: Fix conversion warnings 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 2035ac03ff st/prober: Silence warnings 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz a98c589a30 c/client: Fix conversion warning 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 065c1c4ee2 c/render: Fix conversion warnings
c/render: Fix conversion warnings
2022-05-02 17:16:04 +01:00
Jakob Bornecrantz e39648bab1 c/multi: Fix conversion warnings 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 32d563d26c c/main: Fix conversion warnings
c/main: Fix conversion warnings
2022-05-02 17:16:04 +01:00
Jakob Bornecrantz d1d58c4bce u/distortion: Fix conversion warning 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz d8003b4c8f u/pacing: Fix conversion warning 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz fa988a7f74 u/time: Fix conversion warning 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 5981a508d2 u/sink: Fix conversion warnings 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 1afc18108e m/3dof: Fix conversion warning 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 0a0d4a49d5 m/space: Fix function call warning 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz d1512f0005 m/lowpass: Fix no define parameter warning 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 91facd10f1 xrt: Add xrt_uuid_t 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 428e46617a st/oxr: Avoid using sprintf 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 545ad5c1bf st/oxr: Avoid using strncpy 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz c6208482b8 c/util: Avoid using sprintf 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 6d2011abfd u/file: Avoid using fopen 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 42ba279050 u/file: Avoid using getenv 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz fbc51366e6 u/config: Avoid using strncpy 2022-05-02 17:16:04 +01:00
Jakob Bornecrantz 9ab5195337 st/oxr: Make sure defines are set for graphics integration files 2022-05-02 15:40:31 +00:00
Jakob Bornecrantz 5f421503e9 st/oxr: Set XR_USE_GRAPHICS_API_VULKAN as a compile define like the others 2022-05-02 15:40:31 +00:00
Jakob Bornecrantz d7613b9b67 st/oxr: Match comp client XLIB deps
Fixes #168
2022-05-02 15:40:31 +00:00
Jakob Bornecrantz f4c26bbabb st/oxr: oxr_session_gfx_gl.c to oxr_session_gfx_gl_xlib.c 2022-05-02 15:40:31 +00:00
Antonio Ospite bd06961188 a/util: Silence percetto warnings also when building with g++
Percetto is using designated struct initializers, but those are not
supported in standard C++ before C++20, resulting in some compilation
warnings.

The previous fix for that was using a diagnostic valid for clang but not
for g++ resulting in another warning when building with g++:

-----------------------------------------------------------------------
In file included from ../monado/src/xrt/auxiliary/math/m_relation_history.cpp:19:
../monado/src/xrt/auxiliary/util/u_trace_marker.h:21:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   21 | #pragma GCC diagnostic ignored "-Wc99-designator"
      |                                ^~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------

For GCC the diagnostics to disable is actually "-Wpedantic", as shown
below:

-----------------------------------------------------------------------
In file included from ../monado/src/xrt/auxiliary/util/u_trace_marker.h:25,
                 from ../monado/src/xrt/auxiliary/math/m_relation_history.cpp:19:
../external/percetto/src/percetto.h: In function ‘void percetto_event_with_args(percetto_category*, uint32_t, const char*, int32_t, const percetto_track*, int64_t, uint64_t)’:
../external/percetto/src/percetto.h:424:5: warning: C++ designated initializers only available with ‘-std=c++2a’ or ‘-std=gnu++2a’ [-Wpedantic]
  424 |     .track = track,
      |     ^
-----------------------------------------------------------------------

And for clang "-Wc++20-designator" should be slightly more accurate:

-----------------------------------------------------------------------
In file included from ../monado/src/xrt/auxiliary/util/u_trace_marker.h:29:
../external/percetto/src/percetto.h:424:5: warning: designated initializers are a C++20 extension [-Wc++20-designator]
    .track = track,
    ^
-----------------------------------------------------------------------

Fix all the warnings by ignoring the right diagnostics depending on the
compiler, taking care of differentiating clang++ from g++ as they both
define __GNUC__.
2022-05-02 17:31:11 +02:00
Jakob Bornecrantz 175ff58f10 build: Remove meson files 2022-04-28 21:36:25 +00:00
Jakob Bornecrantz bc89a23280 c/client: Use helper function to see if timeline semaphore is avaiable 2022-04-28 10:55:55 +01:00
Jakob Bornecrantz 0dbe9857c3 a/vk: Add function to check timeline semaphore import/export cap 2022-04-28 10:55:55 +01:00
Jakob Bornecrantz 3492c9e948 st/oxr: Tidy and print out suggested uuid in physical device selection code 2022-04-28 10:29:56 +01:00
Jakob Bornecrantz 8dfae6d1d1 st/oxr: Log information when creating VkInstance & VkDevice 2022-04-28 10:27:11 +01:00
Ryan Pavlik a10206dce6 a/vk: Fix MSVC build.
Apparently static initializers referring to other statics are not enjoyed
by Microsoft's compiler
2022-04-27 15:23:24 +00:00
Ryan Pavlik 7db9131aab a/util: Add pop_back to HistoryBuffer 2022-04-27 09:51:12 -05:00
nima01 232b3bade5 aux/math: More double-precision matrix and vector support 2022-04-25 19:14:46 +00:00
Jakob Bornecrantz 27e4577acb a/vk: Tidy calls to vk_get_memory_type 2022-04-24 22:47:51 +01:00
Jakob Bornecrantz 045fc9c33f a/vk: Add caller_name argument to vk_alloc_and_bind_image_memory for better debugging 2022-04-24 22:47:51 +01:00
Jakob Bornecrantz 917265d1b2 a/vk: Add vk_convert_timestamps_to_host_ns function 2022-04-24 22:47:51 +01:00
Jakob Bornecrantz f217046810 a/vk: Get the timestamp valid bits 2022-04-24 11:10:03 +01:00
Jakob Bornecrantz 599527fe01 a/vk: Fill in timestamp feature information 2022-04-24 11:10:03 +01:00
Jakob Bornecrantz 3aa4fdb096 a/vk: Add function to print device features 2022-04-24 11:10:03 +01:00
Jakob Bornecrantz f65a8b1eda a/vk: Add VK_EXT_calibrated_timestamps 2022-04-24 00:29:41 +01:00
Jakob Bornecrantz 9e58ab69e0 a/vk: Add VkQueryPool functions 2022-04-24 00:29:41 +01:00
Ryan Pavlik 2f78acd108 cmake: Copy some deps over when installing on Windows. 2022-04-21 17:17:16 -05:00
Ryan Pavlik 0926ce1dab cmake: Clean up how we install the runtime 2022-04-21 17:17:16 -05:00
Ryan Pavlik 86ee913086 cmake: Use new module for generating manifests
Remove the old parts.
2022-04-21 17:17:16 -05:00
Ryan Pavlik e75fae4d80 cmake: Fix where we install the runtime on Windows 2022-04-21 16:29:17 -05:00
Ryan Pavlik ad6b70267e cmake: Apparently Windows needs backslashes in the manifest files. 2022-04-21 16:23:49 -05:00
Ryan Pavlik aa4f43b049 cmake: Improve manifest installation, allowing relative paths to be generated. 2022-04-20 11:47:04 -05:00
Jakob Bornecrantz 3d35890206 u/pacing: Trace a little bit more to show when the app is late 2022-04-18 23:26:52 +00:00
Jakob Bornecrantz 4f5bcc5c22 u/pacing: Use the correct term for when the GPU work is done 2022-04-18 23:26:52 +00:00
Jakob Bornecrantz 93091157b8 u/pacing: Correct account for the apps full time when predicting 2022-04-18 23:26:52 +00:00
Jakob Bornecrantz c5fe86ccf9 u/trace_marker: Add env varible to enable/disable tracing
Should a application load and unload the OpenXR runtime driver multiple times
the Perfetto code becomes unstable and eventually crashes. This unfortunately
happens with the CTS, to avoid having to recompile Monado and a env variable
to control if tracing should be used.
2022-04-18 22:41:17 +00:00
Jakob Bornecrantz 7b82b63896 c/render: Remove unused timewarp shader 2022-04-18 18:48:54 +01:00
Jakob Bornecrantz 95d5343c9a c/render: Make distortion shader optionally do timewarp 2022-04-18 18:48:54 +01:00
Jakob Bornecrantz 0be36ccc9d c/render: Use shader specialisation to set distortion_texel_count 2022-04-18 18:48:54 +01:00
Jakob Bornecrantz 7ba7f43e83 a/vk: Add specialization_info argument to vk_create_compute_pipeline 2022-04-18 18:48:54 +01:00
Ryan Pavlik 068ec80f9d external: Regenerate glad2 2022-04-18 12:24:18 -05:00
Ryan Pavlik 0f92ba2137 external: Add GL_EXT_semaphore to glad 2022-04-18 12:18:51 -05:00
Ryan Pavlik e9f0ec4313 external: Have GLAD2 also generate wgl headers 2022-04-18 12:18:43 -05:00
Ryan Pavlik aad3b51be4 external: Make the script to generate GLAD2 a standalone script
Extension list not changed, just sorted.
2022-04-18 12:18:29 -05:00
Ryan Pavlik 2d916c11c5 xrt: Fix OpenXR platform include on Windows 2022-04-18 12:12:43 -05:00
Jakob Bornecrantz d24375f8ab st/oxr: Tidy order of extensions (NFC) 2022-04-18 17:39:28 +01:00
Ryan Pavlik 02435cc033 xrt: clarify comment 2022-04-18 10:54:22 -05:00
Ryan Pavlik 3ed593df4b st/oxr: Fix typo in comment 2022-04-18 10:53:09 -05:00
Ryan Pavlik 5dcb5c360c comp: Fix warnings on MSVC 2022-04-18 10:53:02 -05:00
Ryan Pavlik 3631289e4f xrt: Rename interface: reserved word in msvc. 2022-04-18 10:52:57 -05:00
Ryan Pavlik 11e0d7ed76 comp: Fix comment typo 2022-04-18 10:52:45 -05:00
Ryan Pavlik 1331e93bdc xrt: Fix typo 2022-04-18 10:52:42 -05:00
Jakob Bornecrantz 8ed5a082be c/render: Add missing comments to timewarp shader 2022-04-18 13:03:32 +01:00
Jakob Bornecrantz 1999891a19 c/render: Use a Vulkan projection matrix with Y down in projection space 2022-04-18 13:03:32 +01:00
Jakob Bornecrantz e561bec87d c/render: Use specialization constant for distortion size
This would allow Vulkan shader specialization to be used to change
the size and runtime instead of having to recompile.
2022-04-18 13:03:32 +01:00
Jakob Bornecrantz 87ea035416 c/render: Document compute distortion shader sampling code 2022-04-18 13:03:32 +01:00
Jakob Bornecrantz f4d3c8a93f c/render: Correctly calculate uv to tan angle offset values 2022-04-18 13:03:32 +01:00
Jakob Bornecrantz f20031ec99 c/render: Correctly convert shader index to target pixel uv 2022-04-18 13:03:32 +01:00
Jakob Bornecrantz ca33ac434c c/render: Correctly scale uv for compute distortion 2022-04-17 15:26:51 +00:00
Jakob Bornecrantz 3b6b45b762 d/wmr: Prettier xfer status printing 2022-04-17 16:06:11 +01:00
Christoph Haag 7ebd11e1d4 comp/render: Add VkExternalMemoryBufferCreateInfo
Fixes validation error when calling render_buffer_init_exportable

VUID-vkBindBufferMemory-memory-02726(ERROR / SPEC): msgNum: -168767885 - Validation Error: [ VUID-vkBindBufferMemory-memory-02726 ] Object 0: handle = 0xe88693000000000c, type = VK_OBJECT_TYPE_BUFFER; Object 1: handle = 0xcad092000000000d, type = VK_OBJECT_TYPE_DEVICE_MEMORY; | MessageID = 0xf5f0ce73 | vkBindBufferMemory(): The VkDeviceMemory (VkDeviceMemory 0xcad092000000000d[]) has an external handleType of VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT which does not include at least one handle from VkBuffer (VkBuffer 0xe88693000000000c[]) handleType Unhandled VkExternalMemoryHandleTypeFlagBits. The Vulkan spec states: If the value of VkExportMemoryAllocateInfo::handleTypes used to allocate memory is not 0, it must include at least one of the handles set in VkExternalMemoryBufferCreateInfo::handleTypes when buffer was created (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkBindBufferMemory-memory-02726)
    Objects: 2
        [0] 0xe88693000000000c, type: 9, name: NULL
        [1] 0xcad092000000000d, type: 8, name: NULL
2022-04-15 01:27:38 +02:00
Ryan Pavlik a55a5a54b3 a/math: Normalize argument order of one euro filter initializing functions. 2022-04-13 09:40:40 -05:00
Ryan Pavlik 3e6ec47296 monado: Apply clang-tidy fixes to most of the codebase.
All at least visually inspected, some revised from the auto-fixit
2022-04-13 09:34:54 -05:00
Nima01 f705683957 d/wmr: Partial decoding of device status message. Notifies when screen is fully powered up Reverb G1. 2022-04-13 00:19:50 +00:00
Ryan Pavlik 029fa2496e a/math: Tell clang-tidy to leave our MSVC-mandated define alone.
Also try to avoid redefinition warnings from MSVC.
2022-04-13 01:11:17 +01:00
Ryan Pavlik 0ae0316400 cmake: Format build files 2022-04-13 01:11:13 +01:00
Ryan Pavlik 4939bc2f59 a/util: Manual fixes to clang-tidy issues. 2022-04-13 01:10:54 +01:00
Ryan Pavlik f769ff8977 comp/main: Manual fixes to clang-tidy issues 2022-04-13 01:10:46 +01:00
Ryan Pavlik 55364cde35 xrt: Manual fixes to clang-tidy issues. 2022-04-13 01:10:14 +01:00
Alexander Koenig 5d76c83c37 Fix typo in rotate_lenses_right quirk, helps with #166 2022-04-12 23:14:32 +00:00
Ryan Pavlik 71580213aa comp/client: Fix doxygen warnings 2022-04-12 23:06:11 +00:00
Ryan Pavlik e551f6a9b8 t/hand/mercury: Fix some doxygen warnings. 2022-04-12 23:06:11 +00:00
Ryan Pavlik 62ff3bad54 t/cli: Fix warning when building without slam 2022-04-12 23:06:11 +00:00
Ryan Pavlik e8435da3e5 st/p: Silence an MSVC warning 2022-04-12 23:06:11 +00:00
Ryan Pavlik 91c94f015e st/oxr: Fix or silence a number of MSVC warnings 2022-04-12 23:06:11 +00:00
Ryan Pavlik ef9b15ee67 d/dummy: Silence some warnings 2022-04-12 23:06:11 +00:00
Ryan Pavlik b999b326dc comp/render: Silence warning 2022-04-12 23:06:11 +00:00
Ryan Pavlik fe7cf853e9 comp/render: Guard gcc pragmas 2022-04-12 23:06:11 +00:00
Ryan Pavlik ad1961fce7 auxiliary: Fix or disable a number of warnings
Both MSVC and doxygen warnings.
2022-04-12 23:06:11 +00:00
Ryan Pavlik 2b5f07c8e4 a/util: Silence warnings if using percetto in C++ 2022-04-12 14:38:58 -05:00
zhibinw 172ed2e847 xrt: Do not require OPENXR permission when connect MonadoService 2022-04-12 14:20:17 +00:00
Mateo de Mayo e41cc1eec3 d/qwerty: Fix warning for AIM pose 2022-04-12 10:20:02 -03:00
Jakob Bornecrantz 9fd8018a16 st/oxr: Improve space and view debug printing 2022-04-11 20:27:53 +01:00
Jakob Bornecrantz eb90745f4e st/oxr: Add pretty print functions 2022-04-11 20:27:53 +01:00
Jakob Bornecrantz 179664d6b6 st/oxr: Add pretty print integration in oxr_sink_logger 2022-04-11 20:27:53 +01:00
Jakob Bornecrantz 03df012e90 st/oxr: Add XRT_PRINTF_FORMAT to oxr_slog 2022-04-11 18:27:39 +01:00
Jakob Bornecrantz 58daee4752 st/oxr: Remove log argument to oxr_action_get_pose_input function 2022-04-11 18:27:39 +01:00
Jakob Bornecrantz e8fb10bd82 u/pretty: Add pretty print helpers 2022-04-11 18:27:39 +01:00
Jakob Bornecrantz cbeebe6ca4 xrt: Add XRT_GET_INPUT_ID 2022-04-09 22:07:06 +01:00
Jakob Bornecrantz b26a602322 c/main: Fix copy-typo 2022-04-08 20:15:00 +01:00
Jakob Bornecrantz 42df7b7b21 c/main: Lock cmd pool mutex when reading back frames 2022-04-08 19:30:06 +01:00
Jakob Bornecrantz 400c3900f0 c/render: Take the pool lock to fix threading errors 2022-04-08 19:20:33 +01:00
Jakob Bornecrantz 0ee1127431 aux/vk: Rename barrier functions and introduce new variant 2022-04-08 19:17:41 +01:00
Jakob Bornecrantz 9d74e7a8c5 aux/vk: Tidy command buffer related functions 2022-04-08 17:34:30 +00:00
Jakob Bornecrantz 6e13a0a21b aux/vk: Use correct aspect for image barrier 2022-04-08 17:34:30 +00:00
Jakob Bornecrantz 0d152381a8 c/client: Move NOOP begin/end to EGL client 2022-04-08 11:32:40 +01:00
Jakob Bornecrantz 46debec4fd c/client: Use begin and end in layer commit 2022-04-08 11:21:06 +01:00
Jakob Bornecrantz 7996457f3e c/client: Tidy 2022-04-08 11:21:06 +01:00
Christoph Haag cb7855b8bd c/client: Ensure the correct GL context is current
when running OpenGL functions.

Co-authored-by: James Hogan <james@albanarts.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2022-04-07 20:17:29 +02:00
James Hogan 7440e14fb4 aux/ogl: Add GLX API wrapper
Add a wrapper for the GLX API around the GLAD header.

Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
2022-04-07 02:21:34 +02:00
James Hogan 3dfcc48564 external: Update GLAD to add GLX 1.3
Update glad command to include GLX 1.3 and regenerate.

This will be useful to implement proper OpenGL context saving,
switching, and restoring.

reuse: Add glad/glx.h
2022-04-07 02:21:34 +02:00
Christoph Haag 8dd19ea794 st/prober: Also disable autoprober drivers when qwerty is enabled 2022-04-06 23:23:55 +02:00
Christoph Haag 6b58c70f11 st/prober: remove stray ; 2022-04-06 23:23:52 +02:00
Mateo de Mayo 8468c8e0a6 t/cli: Add slambatch command 2022-04-06 11:50:17 -03:00
Mateo de Mayo 310248546d d/euroc: Add euroc runner 2022-04-06 11:50:17 -03:00
Mateo de Mayo 4c85e3fbb3 t/slam: Refactor tracker to accept a config struct on creation 2022-04-06 11:50:17 -03:00
Mateo de Mayo a80f88eb00 d/euroc: Refactor player to accept a config struct on creation 2022-04-06 11:50:17 -03:00
Mateo de Mayo ff8c2d820c d/euroc: Improve player tolerance to more datasets
Makes all usable euroc and tumvi datasets stream properly by fixing
some border cases that a couple of datasets had.
2022-04-06 11:50:17 -03:00
Mateo de Mayo 2a4a9aa210 t/slam: Add configuration options to tracker
Specifically:
- SLAM_PREDICTION_TYPE
- SLAM_CSV_PATH
2022-04-06 11:50:17 -03:00
Mateo de Mayo 7f0699dffc d/euroc: Add configuration options to the player
Specifically:
- EUROC_PLAY_FROM_START
- EUROC_USE_SOURCE_TS
- EUROC_PRINT_PROGRESS
- EUROC_MAX_SPEED
- EUROC_PLAYBACK_SPEED
2022-04-06 11:50:17 -03:00
Mateo de Mayo b6cd12a860 misc: Add gui nullcheck and initialize thread running field 2022-04-06 11:50:17 -03:00
Jakob Bornecrantz 716ba4db60 tracking: Predeclare struct instead of including cJSON in header 2022-04-06 15:38:44 +01:00
Jakob Bornecrantz d89b8f40d9 st/oxr: Detect VK_LAYER_MND_enable_timeline_semaphore
And enable timeline semaphore support if it is found.
2022-04-06 12:08:48 +01:00
Jakob Bornecrantz 1a00709186 aux/vk: Add vkEnumerateDeviceLayerProperties to instance functions 2022-04-06 11:45:24 +01:00
Campbell Suter e18ca850ba steamvr_drv: Use the correct grip name for XRT_DEVICE_SIMPLE_CONTROLLER
Previously, xrt_device_get_tracked_pose was called with
XRT_INPUT_GENERIC_HEAD_POSE when getting the pose of a SIMPLE_CONTROLLER device.

When using the 'remote' driver, this lead to two warnings per frame [1] and more
importantly the device pose wasn't being read. I haven't tested this with any
other drivers, but it appears that at least the QUERTY driver likely has an
issue with this too, as it uses the input name to determine whether to return
the HMD or controller pose.

[1] ERROR [r_device_get_tracked_pose] Unknown input name
2022-04-06 00:50:40 +00:00
Ryan Pavlik 16c016c4ca comp/render: Use a helper 2022-04-05 22:48:24 +00:00
Ryan Pavlik 8af498aa20 a/vk: Fix typo 2022-04-05 22:48:24 +00:00
Ryan Pavlik 7952773908 a/vk: Expose get_device_memory_handle as vk_get_native_handle_from_device_memory 2022-04-05 22:48:24 +00:00
Ryan Pavlik 9463de7e6f xrt: Undef Status and Bool in vulkan include if we think the xlib header got included. 2022-04-05 23:32:07 +01:00
Jakob Bornecrantz 48fd3e626c c/client: Tidy VK compositor 2022-04-05 23:22:26 +01:00
Jakob Bornecrantz 3bff3827d9 c/client: Remove acquire_release_fence completely
The barriers are a completely GPU affair no need to syncronize with the host.
2022-04-05 23:22:26 +01:00
Jakob Bornecrantz e7713bf1e4 c/multi: Be slightly smarter about late frames 2022-04-05 23:22:26 +01:00
Jakob Bornecrantz cf413a445f c/multi: Add per client thread that waits for sync objects 2022-04-05 23:22:26 +01:00
Jakob Bornecrantz 0595070132 u/pacing: Split draw into draw and wait, improve pipelining 2022-04-05 22:01:17 +00:00
Jakob Bornecrantz 47649f56b6 u/pacing: Track when the app wants the frame to be displayed 2022-04-05 22:01:17 +00:00
Jakob Bornecrantz 8e8a0b38c6 u/pacing: Add gpu done time tracking to app pacer 2022-04-05 22:01:17 +00:00
Jakob Bornecrantz 04b9602dd1 u/pacing: Allow more then two frames to be alive at the same time 2022-04-05 22:01:17 +00:00
Jakob Bornecrantz f4b75b3561 u/trace_marker: Add wait pacing track 2022-04-05 22:01:17 +00:00
Jakob Bornecrantz e77094892f st/oxr: Add debug flag to force timeline semaphores on 2022-04-05 22:01:17 +00:00
Jakob Bornecrantz cfb8d36b46 c/render: Rename files 2022-04-05 22:45:45 +01:00
Jakob Bornecrantz ee09070608 c/render: Rename all functions and structs with new prefix 2022-04-05 22:45:12 +01:00
Jakob Bornecrantz d93c2dc4d8 c/render: Remove unused comp_rendering_compute_data 2022-04-05 22:45:12 +01:00
Jakob Bornecrantz 2f24353556 c/render: Remove main/comp_compositor include 2022-04-05 22:45:10 +01:00
Jakob Bornecrantz c317a27a1d aux/vk: Remove setting of format on out struct 2022-04-04 16:12:08 +00:00
Jakob Bornecrantz 1c67113e20 aux/vk: Tidy vk_image_allocator 2022-04-04 16:12:08 +00:00
Jakob Bornecrantz 15da4636f8 aux/vk: Use VK_CSCI_FORMATS helper for swapchain image flags 2022-04-01 19:53:02 +01:00
Jakob Bornecrantz aaa2d4e8e6 aux/vk: Move compositor image format list here 2022-04-01 19:44:07 +01:00
Jakob Bornecrantz d31232c794 aux/vk: Move vk_insert_image_memory_barrier declaration (NFC) 2022-04-01 18:54:18 +01:00
Jakob Bornecrantz dea7bc847e c/util: Make COMP_VULKAN_FORMATS differentiate between depth-stencil, depth and stencil formats 2022-04-01 18:53:47 +01:00
Christoph Haag 5aa7ef25b8 c/util: Remove old format checking code
It's not the compositors job to check the format.
2022-04-01 18:53:47 +01:00
Christoph Haag 322ce27163 c/util: Print warning when attempting to create protected content swapchain 2022-04-01 18:53:47 +01:00
Christoph Haag 22c7fea639 ipc: Amend swapchain create error for unsupported swapchains 2022-04-01 18:10:22 +01:00
Jakob Bornecrantz 4f0b425da7 c/client: Tidy error messages in GL compositor 2022-03-31 01:14:04 +01:00
Jakob Bornecrantz d53659a476 c/client: Add a littel bit of tracing to GL compositor 2022-03-31 01:09:25 +01:00
Jakob Bornecrantz 38e7a0a1e6 c/client: Format format list 2022-03-31 00:45:51 +01:00
Jakob Bornecrantz 4fe8e89be9 c/client: Add new formats to GL 2022-03-31 00:43:53 +01:00
Christoph Haag 1eeb870a2d ipc: Add float to supported types in proto 2022-03-30 22:35:33 +02:00
Jakob Bornecrantz 4f1dfa7ae4 aux/vk: Refactor out some printing functions 2022-03-30 20:14:38 +01:00
Jakob Bornecrantz 2f73c7569a aux/vk: Refactor out init functions 2022-03-30 20:08:35 +01:00
Ryan Pavlik 6d621b07c5 st/oxr: Add missing ifdef fixing broken build if Vulkan missing 2022-03-30 09:26:22 -05:00
Christoph Haag 068bf05057 st/oxr: Fix pure_relation_from_space
Fixes in particular the space transform submitted in composition layers
in local reference space.

Consider a pose given with a pose offset to an XrSpace as its origin.
To construct the Pose in global space, simply add up XrSpace pose in
global space, XrSpace pose offset and the given pose.

     Given pose with a
     pose offset to XrSpace as origin
            /|\         /|\
            /            |
           /             |
   XrSpace pose offset   |
         /|\             |
          |              |
          |              |
      XrSpace pose       |
     in global space     |
            /|\          |
             \           |
              \          |
            Global Space origin
2022-03-30 02:03:18 +02:00
Jakob Bornecrantz 922fdff62d c/main: Use new format checking helpers 2022-03-29 16:26:34 +01:00
Jakob Bornecrantz c3eb8cd014 c/util: s/colour/color/g 2022-03-29 16:26:34 +01:00
Jakob Bornecrantz 08e025522f c/util: Add missing AHardwareBuffer formats 2022-03-29 16:26:34 +01:00
Jakob Bornecrantz 658c67b0fc c/util: Add vulkan format checking code 2022-03-29 16:26:34 +01:00
Jakob Bornecrantz f54894ee0d aux/vk: Refactor out external handle type for compositor swapchain image 2022-03-29 16:26:34 +01:00
Jakob Bornecrantz 65ced47143 aux/vk: Add more formats to vk_format_string 2022-03-29 16:26:34 +01:00
Jakob Bornecrantz 8cfe941c01 aux/vk: Rename vk_[color_]format_string 2022-03-29 16:26:34 +01:00
Ryan Pavlik 96314d4f76 meson: Define XRT_HAVE_HIDAPI if using it 2022-03-29 09:31:49 -05:00
Jakob Bornecrantz b4f2bc88c8 cmake: Introduce XRT_HAVE_HIDAPI to make HIDAPI controllable 2022-03-28 22:35:01 +00:00