Commit graph

3803 commits

Author SHA1 Message Date
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
Christoph Haag 5d50be0164 aux/vk: Always use dedicated allocation on desktop
Fixes CTS on nvidia.

Example code given by the driver devs in the nvidia forums was
VkBool32 dedicatedAllocation = (memDedicatedReq.requiresDedicatedAllocation != VK_FALSE) ||
                               (memDedicatedReq.prefersDedicatedAllocation != VK_FALSE);

However on GTX 1080, nvidia 470.103 with

    ./conformance_cli "Timed Pipelined Frame Submission" -G Vulkan2

we are to create a VkImage with

  DEBUG [create_image] create_image: Use dedicated allocation: 0 (preferred: 0, required: 0)

doing so causes the VkFence wait in vk_submit_cmd_buffer to fail randomly with
either VK_TIMEOUT or VK_ERROR_DEVICE_LOST.

On AMD radv we are told to use dedicated allocation:

  DEBUG [create_image] create_image: Use dedicated allocation: 1 (preferred: 1, required: 1)
2022-03-28 23:16:05 +02:00
Christoph Haag 18376007f9 st/oxr: oxr_space type is now an enum
v2: Get rid of ref_space_type
2022-03-25 18:47:46 +00:00
Christoph Haag 543fbc38e2 st/oxr: Allow locating views in all spaces 2022-03-25 18:47:46 +00:00
Christoph Haag 6c9f1f4083 t/hand: Add meson build for mercury 2022-03-25 18:33:04 +00:00
Christoph Haag 02e5e7be4a st/oxr: Fix getting velocity next struct in xrLocateSpace
fixes 85a2abae
2022-03-25 15:36:14 +01:00
Moses Turner 870a2ce704 d/ht: support DepthAI cameras and Mercury hand tracking 2022-03-23 18:30:02 -05:00
Moses Turner 00be5d0551 Add Mercury grayscale hand tracking! 2022-03-23 18:30:02 -05:00
Antonio Ospite 28b53689f4 c/render: add comp_buffer_init_exportable helper to create exportable buffers
Some downstream user might want to use the very handy comp_buffer_init()
helper to create buffers, but the latter does not cover the case when
the buffer needs to be exportable for API interoperability.

Add a new comp_buffer_init_exportable() helper to cover that case, this
is done in a way that is not particularly invasive for existing users of
comp_buffer_init(), as all the logic about the exportability is handled
by the new function.
2022-03-23 21:38:22 +00:00
Moses Turner 9ea9d0babf t/hand: Correct old_rgb namespace 2022-03-23 20:56:15 +00:00
Moses Turner 912cc22c20 d/dai: Get ready to support fisheye cameras
Remove the #if 0 after the next depthai-core release.
2022-03-23 20:56:15 +00:00
Moses Turner 0a843eb20f d/dai: Translation is in cm but in m in Monado 2022-03-23 20:56:15 +00:00
Moses Turner 9417fe8d7f a/tracking: Support different numbers of calib parameters 2022-03-23 20:56:15 +00:00
Jakob Bornecrantz 83c8b1da86 u/sink: Make u_sink_create_format_converter support L8
Co-authored-by: Moses Turner <moses@collabora.com>
2022-03-23 20:56:15 +00:00
Moses Turner e817a18cfd u/worker: Add #pragma once 2022-03-23 20:56:15 +00:00
Ryan Pavlik 8bfb4b3d09 cmake: Update to handle newer Percetto cmake build details 2022-03-23 11:22:10 -05:00
Jakob Bornecrantz 074a0afc32 c/vk: Make it possible to request higher Vulkan version 2022-03-22 15:19:48 +00:00
Jakob Bornecrantz 8d660b6994 cmake: Make it possible to select SPIR-V version to target 2022-03-22 15:19:48 +00:00
Christoph Haag 6fdd8ab93a aux/config_json: Only check version for camera tracking config
Only the camera tracking config writes and uses the version field.

Unfortunately the tracking override config is written into the same json
object while not making use of the version field.
2022-03-22 12:35:01 +00:00
korejan d43c7ffa71 android: Support for using device's set display refresh rate
* Adds support for querying the device's currently set display refresh rate to
  be used for android driver on creation. Allowing for devices which support
  selecting other refresh rate modes beyond 60hz.
* Changes hardcoded sensor polling rate to now match refresh queried from the
  device.
2022-03-22 12:33:30 +00:00
Jakob Bornecrantz e2e65aa241 u/logging: Fix va_copy usage 2022-03-21 22:19:30 +00:00
Jakob Bornecrantz 4e4246866b st/gui: Use unique IDs instead of child windows 2022-03-21 13:14:19 +00:00
Moses Turner b3872e925f Switch real-time users of u_sink_queue to u_sink_simple_queue 2022-03-19 14:28:09 +00:00
Moses Turner 09da6e09dc u/sink: Add u_sink_simple_queue 2022-03-19 14:28:09 +00:00
Moses Turner 662b72e2f6 u/sink: Tiny refactor for queue 2022-03-19 14:28:09 +00:00
Connor Smith 703baa94fe Make app pacing more robust to variable composition->display times.
If the last returned display time shifts backwards slightly with respect to the
last sampled display time from the compositor, the next predicted display time
will not move forward by one frame. Adding half the display period to the
comparison makes the pacing robust to this case.
2022-03-19 00:57:41 +00:00
Jakob Bornecrantz 170fe0e5d9 aux/vk: Refactor out semaphore and native creation into a helper 2022-03-19 00:41:29 +00:00
Moses Turner b6e5c296f5 comp: Factor frame-timing helper out of comp_compositor
So that we can use it for readback and anything else
2022-03-18 19:00:28 -05:00
Moses Turner 8fe2a86886 st/gui: Add SW Ultrafast and SW Veryfast pipelines
Yes, I really need those. SW Fast is still the default.
2022-03-18 18:59:37 -05:00
Jakob Bornecrantz 29acdba23f aux/vk: Tidy get/import functions for native handles (NFC) 2022-03-18 23:20:20 +00:00
Jakob Bornecrantz 77ba132452 u/logging: Add u_log_set_sink implementation 2022-03-17 15:37:09 +00:00
Jakob Bornecrantz 6f10a20ce0 d/multi: Use xrt_device_get_tracked_pose function 2022-03-17 02:08:33 +00:00
Ryan Pavlik 81eaf5c28c gradle: update NDK and build tools versions to be consistent. 2022-03-16 20:29:50 +00:00
Jakob Bornecrantz 71d9887b5b xrt: Tidy xrt_instance.h (NFC) 2022-03-16 15:46:14 +00:00
Moses Turner d2366b31dc d/multi: Correctly override the head pose in get_view_poses 2022-03-15 20:13:10 -05:00
Moses Turner e4805c07e2 d/rs: Tracking origin probably should have an identity pose 2022-03-15 20:13:10 -05:00
utzcoz b2ccc8419c t/oxr_android: Move import under license for openxr_android build.gradle
Signed-off-by: utzcoz <utzcoz@outlook.com>
2022-03-15 14:28:40 +00:00
utzcoz 45f1de0c53 t/oxr_android: Replace DisplayOverOtherAppsStatusFragment instead of adding
If we click button to enable DisplayOverOtherApps for monado, use
back button to com back to Launcher and hot-start monado app, the
disabled status fragment is not removed, and enabled status fraqgment is
added top on disabled status fragment, that causes text overlap.

This CL will use FragmentTransaction#replace instead of
FragmentTransaction#add to ensure there is only one
DisplayOverOtherAppsStatusFragment, and new status will replace old
status without any overlap.

Signed-off-by: utzcoz <utzcoz@outlook.com>
2022-03-15 14:28:40 +00:00
utzcoz b6e8801ea4 t/oxr_android: Replace full-name qualified with importing for build.gradle
Signed-off-by: utzcoz <utzcoz@outlook.com>
2022-03-15 14:28:40 +00:00
Jakob Bornecrantz b2d2cf3ade st/oxr: Tidy oxr_space_locate 2022-03-15 00:16:17 +00:00
Jakob Bornecrantz 587d26bb45 st/oxr: Only access space velocity through chain helper 2022-03-15 00:16:17 +00:00
Jakob Bornecrantz 85a2abaec6 st/oxr: Refactor pose and fov copies into helpers 2022-03-15 00:16:17 +00:00
Jakob Bornecrantz 1fb5656862 st/oxr: Improve logging in xrLocateSpace 2022-03-15 00:16:17 +00:00
Jakob Bornecrantz 4fc02cf60e st/oxr: Ensure velocities flags and values are zeroed 2022-03-15 00:16:17 +00:00
Jakob Bornecrantz 798932fbf2 st/oxr: Set position to identity and zero velocities if the spaces are locatable 2022-03-15 00:16:17 +00:00
Jakob Bornecrantz 291e795728 st/oxr: Add XRT_CHECK_RESULT to some space functions 2022-03-15 00:16:17 +00:00
Jakob Bornecrantz e89e3d5276 aux/vk: Add XRT_CHECK_RETURN to sync functions 2022-03-15 00:16:17 +00:00
Jakob Bornecrantz 57d1394941 xrt: Add XRT_CHECK_RESULT define 2022-03-15 00:16:17 +00:00
Mateo de Mayo 2bb0c5cda5 t/slam: Implement CSV writers for trajectories and timing info
This CSV files can be used for offline analysis.
2022-03-14 23:42:13 +00:00
Mateo de Mayo c9f7184d64 t/slam: Implement timing and trajectory error UI graphs 2022-03-14 23:42:13 +00:00
Mateo de Mayo af2dde11c3 misc: Fix some release build warnings and minor changes
- Add CMakeUserPresets.json to .gitignore
- Fix DASSERTs warning for release builds
- Do not use one euro filter with invalid poses
- Other NFC style changes
2022-03-14 23:42:13 +00:00
Mateo de Mayo e889ee7562 d/euroc: Implement ground truth trajectory load 2022-03-14 23:42:13 +00:00
Mateo de Mayo 71694b80fd d/euroc: Refactor player to stream samples more like a real device
Splits the image and IMU producers into their own threads.
2022-03-14 23:42:13 +00:00
Mateo de Mayo 1dbda3d8c8 t/euroc: Tie CSV file opening to recorder lifecycle
This is a better way of handling writing small but high frequency data
like IMU samples so as to avoid continuous opening and closing of a file.
2022-03-14 23:42:13 +00:00
Mateo de Mayo 2d9c1b2b11 external: Update slam_tracker 2.0.0 with support for timing
Adds pose extension functionality with a timing pose extension that
allows SLAM/VIO systems to report internal timestamps for performance
measurement.
2022-03-14 23:42:13 +00:00
Mateo de Mayo 147d4c5d26 xrt: Add groundtruth sink to xrt_slam_sinks 2022-03-14 23:42:13 +00:00
Mateo de Mayo 88bd7a669d xrt: Add pose sink interface 2022-03-14 23:42:13 +00:00
Jakob Bornecrantz c766411b50 c/client: Impelement xrt_compositor_semaphore interfaces 2022-03-14 19:53:05 +00:00
Jakob Bornecrantz ef373662f2 ipc: Impelement xrt_compositor_semaphore interfaces 2022-03-14 19:53:05 +00:00
Jakob Bornecrantz ca7526a3e2 c/multi: Impelement xrt_compositor_semaphore interfaces 2022-03-14 19:53:05 +00:00
Jakob Bornecrantz 8a9a8aeeba c/util: Impelement xrt_compositor_semaphore interfaces 2022-03-14 19:53:05 +00:00
Jakob Bornecrantz 851224123e xrt: Add compositor semaphore interface 2022-03-14 19:52:48 +00:00
Jakob Bornecrantz 37354b953c aux/vk: Add more timeline semaphore functions 2022-03-14 18:58:35 +00:00
Jakob Bornecrantz 16bae922e2 c/main: Enable timeline semaphores where available 2022-03-14 18:58:35 +00:00
Christoph Haag dbb21715b0 st/oxr: Enable timeline semaphores where available
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2022-03-14 18:58:35 +00:00
Christoph Haag 02c456c192 st/oxr: Port XR_KHR_vulkan_enable2 init to u_string_list 2022-03-14 18:58:35 +00:00
Jakob Bornecrantz f4f2196e34 xrt: Add a way to say that timeline semaphores have been enabled 2022-03-14 18:58:35 +00:00
Jakob Bornecrantz d0f6ea10bc u/worker: Fix some late feedback 2022-03-14 18:57:35 +00:00
Jakob Bornecrantz 84069cc4f0 u/logging: Add logging sink to intercept log messages 2022-03-14 17:21:20 +00:00
Antonio Ospite 6ca4522de0 d/ns: really silence -Wunused-result warning
A previous change didn't really ignore the return value of fread() and
a warning was still emitted:

-----------------------------------------------------------------------
[103/1571] Building C object src/xrt/drivers/CMakeFiles/drv_ns.dir/north_star/ns_hmd.c.o
../src/xrt/drivers/north_star/ns_hmd.c: In function ‘ns_config_load’:
../src/xrt/drivers/north_star/ns_hmd.c:512:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
  512 |  (void)fread(json, 1, file_size, config_file);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------

Check the return value of fread to fix the warning for good, and declare
the return value of ftell as long as stated in the man page.
2022-03-14 14:06:02 +00:00
Antonio Ospite 37852ffa65 xrt: fix -Wreturn-type warnings
Add some missing returns pointed out by -Wreturn-type:

-----------------------------------------------------------------------
[75/1571] Building C object src/xrt/auxiliary/CMakeFiles/aux_util.dir/util/u_config_json.c.o
.../src/xrt/auxiliary/util/u_config_json.c: In function ‘u_gui_state_scene_to_string’:
.../src/xrt/auxiliary/util/u_config_json.c:524:1: warning: control reaches end of non-void function [-Wreturn-type]
  524 | }
      | ^
-----------------------------------------------------------------------
2022-03-14 14:06:02 +00:00
Jakob Bornecrantz 771aeda784 u/worker: Add task worker helper 2022-03-11 15:29:16 +00:00
Jakob Bornecrantz 76d8944765 os/threading: Add os_cond wrapper 2022-03-11 15:29:16 +00:00
Christoph Haag 7894039962 st/oxr: return defined result early on fail in xrLocateViews 2022-03-11 00:38:35 +01:00
Christoph Haag 4501088312 st/oxr: Don't return invalid pose after local space set up 2022-03-11 00:23:12 +01:00
Jakob Bornecrantz a0c8cc14f5 external: Update to Catch2 version 2.13.8 2022-03-09 22:34:40 +00:00
Jakob Bornecrantz e1b0f55a87 d/ns: Always check to close file on error path 2022-03-09 22:34:37 +00:00
Antonio Ospite a4167ee500 d/ns: silence -Wunused-result warning, close config_file in error paths
On some systems fread() is declared with  attribute warn_unused_result
and this results in a build warning:

-----------------------------------------------------------------------
Building C object src/xrt/drivers/CMakeFiles/drv_ns.dir/north_star/ns_hmd.c.o
.../src/xrt/drivers/north_star/ns_hmd.c: In function ‘ns_config_load’:
.../src/xrt/drivers/north_star/ns_hmd.c:512:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
  512 |  fread(json, 1, file_size, config_file);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------

Explicitly ignore the return value of that fread() to silence the
warning.

And while at it also close config_file in some error paths between
fopen() and fclose() which where leaking the file pointer when jumping
to the parse_error label.
2022-03-09 16:10:43 +01:00
Antonio Ospite beda8f35b2 xrt: fix -Wmissing-field-initializers warning in comp_window_wayland.c
Newer wayland protocols have a new filed in xdg_toplevel_listener which
is not initialized:

-----------------------------------------------------------------------
[215/315] Building C object src/xrt/compositor/CMakeFiles/comp_main.dir/main/comp_window_wayland.c.o
.../src/xrt/compositor/main/comp_window_wayland.c:182:1: warning: missing field 'configure_bounds' initializer [-Wmissing-field-initializers]
};
^
1 warning generated.
-----------------------------------------------------------------------

Detect the version when this is needed and initialize the field to
silence the warning.
2022-03-09 14:53:06 +01:00
Antonio Ospite e8c9d8f575 xrt: fix -Wunused-variable warnings
Some variables are only used in asserts, so they may be unused
depending on the build type:

-----------------------------------------------------------------------
[68/315] Building C object src/xrt/auxiliary/CMakeFiles/aux_util.dir/util/u_sink_combiner.c.o
.../src/xrt/auxiliary/util/u_sink_combiner.c:188:11: warning: unused variable 'diff_ns' [-Wunused-variable]
                int64_t diff_ns = frames[0]->timestamp - frames[1]->timestamp;
                        ^
1 warning generated.
[205/315] Building C object src/xrt/compositor/CMakeFiles/comp_main.dir/main/comp_renderer.c.o
.../src/xrt/compositor/main/comp_renderer.c:872:17: warning: unused variable 'layer_count' [-Wunused-variable]
        const uint32_t layer_count = c->base.slot.layer_count;
                       ^
1 warning generated.
-----------------------------------------------------------------------

Mark them as XRT_MAYBE_UNUSED to fix the build warnings.
2022-03-09 14:53:06 +01:00
Antonio Ospite 14a1ced0e4 xrt: fix -Wreturn-type warnings
Add some missing returns pointed out by -Wreturn-type:

-----------------------------------------------------------------------
[32/315] Building C object src/xrt/auxiliary/CMakeFiles/aux_gstreamer.dir/gstreamer/gst_sink.c.o
.../src/xrt/auxiliary/gstreamer/gst_sink.c:53:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
}
^
1 warning generated.
[84/315] Building C object src/xrt/auxiliary/CMakeFiles/aux_vk.dir/vk/vk_compositor_flags.c.o
.../src/xrt/auxiliary/vk/vk_compositor_flags.c:117:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
}
^
.../src/xrt/auxiliary/vk/vk_compositor_flags.c:146:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
}
^
2 warnings generated.
-----------------------------------------------------------------------

For the function returning VkImageAspectFlags return a literal 0 because
the enum values VK_IMAGE_ASPECT_NONE or VK_IMAGE_ASPECT_NONE_KHR may not
always be defined.
2022-03-09 14:52:29 +01:00
Jakob Bornecrantz 17e9e06de7 aux/vk: Detect external semaphore support 2022-03-08 21:04:56 +00:00
Jakob Bornecrantz c0bd8ce3ba aux/vk: Let vk_init_from_given enable timeline semaphores 2022-03-08 21:04:56 +00:00
Jakob Bornecrantz 3c8378631f aux/vk: Properly set log_level in given vk_bundles 2022-03-08 21:04:56 +00:00
Jakob Bornecrantz 3044794f93 aux/vk: Rename timeline_semaphores to features.timeline_semaphore 2022-03-08 21:04:56 +00:00
Jakob Bornecrantz 8bda87c855 xrt: Correct xrt_compositor_fence::wait docu 2022-03-08 21:04:56 +00:00
Moses Turner 30b779e515 t/hand: Add ht_sync 2022-03-08 20:44:25 +00:00
Moses Turner 012c86352e t/hand: Add async wrapper around sync helper
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2022-03-08 20:44:18 +00:00
Jakob Bornecrantz 60cd630271 tracking: Add new hand tracking interface header
Co-authored-by: Moses Turner <moses@collabora.com>
2022-03-08 20:38:58 +00:00
Moses Turner 7235b6a45a u/sink: Add some comments 2022-03-08 20:38:58 +00:00
Moses Turner 37f0c901d2 u/sink: Add sink to convert from stereo to two SLAM frames 2022-03-08 20:38:58 +00:00
Moses Turner a9db1a6f6e d/ht_crtl_emu: Free driver 2022-03-08 13:52:23 -06:00
Jakob Bornecrantz 7b0cee5a85 u/trace_marker: Add new tracking category 2022-03-08 10:46:48 +00:00
Jakob Bornecrantz d06bb04357 u/trace_marker: Tidy 2022-03-08 10:46:47 +00:00
Jakob Bornecrantz 0ebb1c3be9 t/psmv: Make TrackerPSMV be standard layout 2022-03-07 16:48:28 +00:00
zhibinw 41db1e5e12 st/oxr: Increase active_wait_frames count after previous xrBeginFrame has been called 2022-03-07 16:35:58 +00:00
Christoph Haag 7c55c51408 st/gui: Add warning when v4l driver is disabled on linux
"Failed to open camera!" is a very uninformative error
2022-03-07 13:53:59 +00:00
Jakob Bornecrantz bf1edf96eb d/dai: Add OV7251 sensor info 2022-03-04 14:04:13 +00:00
Christoph Haag 61024ab9a1 st/oxr: Use correct timestamp for layer space transform 2022-03-03 23:34:31 +01:00
Christoph Haag 76c18bda47 st/oxr: Fix layer poses sent to the compositor 2022-03-03 17:03:36 +01:00
Christoph Haag b863aa2629 st/oxr: don't run the timestamp conversion in a loop 2022-03-03 01:42:35 +01:00
Christoph Haag 075fde3613 st/oxr: propagate a few more space handling return codes 2022-03-03 01:42:02 +01:00
Christoph Haag 58c9679087 st/oxr: remove another unused function 2022-03-03 01:41:25 +01:00
Christoph Haag ed0bd9c244 st/oxr: rework spaces 2022-03-02 17:40:00 +00:00
Christoph Haag f633680506 st/oxr: Fix local[e]_ref_space typo 2022-03-02 17:40:00 +00:00
Antonio Ospite 031a53d6fd c/render: assign comp_buffer.size when creating a buffer
The size field in comp_buffer was never assigned, and also never used as
all comp_buffer users rely on the allocation_size field.

Use the size field to store the size originally requested when creating
the buffer which could be different from the value returned in the
allocation_size field.

Having both sizes available allows a user to check if allocation_size is
in fact different from the requested size.
2022-03-02 16:41:00 +00:00
Jakob Bornecrantz eca2e2535f c/util: Return timeout on fence timeout 2022-03-02 11:01:07 +00:00
Jakob Bornecrantz 772b6256d6 c/multi: Handle fence timeouts 2022-03-02 11:01:07 +00:00
Jakob Bornecrantz 7e8f4f46c6 xrt: Add XRT_TIMEOUT to xrt_result_t 2022-03-01 20:59:35 +00:00
Jakob Bornecrantz e13cfd2fec c/shader: Fix color values in compute clear shader 2022-03-01 13:58:07 +00:00
Moses Turner ffee6c360b u/sink: Don't sleep when combining frames; we're not testing
Where's the dunce cap?
2022-03-01 01:14:57 -06:00
Jakob Bornecrantz 8229905233 c/client: Set default logging level for vk_bundle in vk compositor 2022-02-25 17:11:38 -06:00
Jakob Bornecrantz f6788f5548 c/client: Create and pass down sync_handles to native compositor 2022-02-25 17:11:38 -06:00
Jakob Bornecrantz ac752a651e c/client: Add tracing to Vulkan client compositor 2022-02-24 20:54:47 +00:00
Jakob Bornecrantz f5c77dfb32 aux/vk: Add vk_create_and_submit_fence_native 2022-02-24 20:54:47 +00:00
Jakob Bornecrantz 78f3340bf5 aux/vk: Check which fence types support import and export 2022-02-24 20:54:47 +00:00
Jakob Bornecrantz ebe895bdb8 aux/vk: Add vkGetPhysicalDeviceExternal[Buffer|Fence|Semaphore]PropertiesKHR (NFC) 2022-02-24 17:51:59 +00:00
Jakob Bornecrantz 543f28abf9 aux/vk: Add vkGetFenceWin32HandleKHR (NFC) 2022-02-24 17:51:59 +00:00
Jakob Bornecrantz 36025886ee aux/vk: Refactor our sync primitives (NFC) 2022-02-24 17:51:59 +00:00
Jakob Bornecrantz d6e0c45855 aux/vk: Order files in build scripts (NFC) 2022-02-24 17:51:59 +00:00
Connor Smith e1c180240e Create VkQueue with queueIndex from XrGraphicsBindingVulkanKHR.
Per XR_KHR_vulkan_enable: "the OpenXR runtime must interpret the image
as being owned by the VkQueue specified in XrGraphicsBindingVulkanKHR."
(https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_KHR_vulkan_enable)
2022-02-23 17:45:46 -05:00
Henry Che add7b5723f Update illixr_device.cpp: There is no function called get_view_pose in xrt_device.h. 2022-02-23 17:13:38 +00:00
Mateo de Mayo cee1571625 d/euroc: Fix euroc player skip functionality 2022-02-22 22:56:07 +00:00
Mateo de Mayo a0021dc7d0 t/euroc: Fix memory leak in euroc recorder
This was the reason the recorder was eating so much RAM.
SSD write speeds should be enough for common use cases to keep RAM stable.
2022-02-22 22:56:07 +00:00
Ryan Pavlik 7b3a2e7c1a a/math: C wrapper for the float low-pass filter too. 2022-02-22 16:44:44 -06:00
Ryan Pavlik cf07791e93 a/math: Add a C wrapper for the integer low-pass filter. 2022-02-22 16:42:53 -06:00
Ryan Pavlik a0e2df4cf0 tracking/math: Move the generic low pass filters to a/math 2022-02-22 16:42:53 -06:00
Jakob Bornecrantz dfb1b8d469 c/render: Do not assume nullDescriptor is available 2022-02-22 21:49:06 +00:00
Jakob Bornecrantz b1b6978069 c/main: Pass in correct pipeline stage to wait on 2022-02-22 21:49:06 +00:00
Ryan Pavlik 4156cabedf a/tracking: Add an integer version of the low-pass filter. 2022-02-22 09:58:19 -06:00
Ryan Pavlik 928254ffed a/math: Add a rational number struct template. 2022-02-22 09:58:19 -06:00
Mateo de Mayo 4b94d83c11 a/math: Fix one euro implementations not dividing by dt
The dy name was kept. It can now be thought of as "[d]erivative of [y]"
instead of the previous "change of y". Also, the beta parameters of the
one-euro users were adjusted by approximately multiplying them by 0.016
to compensate.
2022-02-22 13:34:45 +00:00
Mateo de Mayo 17dee2bb68 t/slam: Cache tracked pose timestamp
This is mainly to avoid problems with filters that calculate
their dt from previous calls. In particular the one euro filter fix
that gets implemented in the next commit would crash because of dt=0.
2022-02-22 13:34:45 +00:00
Mateo de Mayo b04c26e522 a/math: Expose quat_{exp, ln} and test them 2022-02-22 13:34:45 +00:00
nima01 be3546eb92 d/wmr: Reverb G1: Avoid camera buffer related hangs 2022-02-20 14:57:36 +00:00
Moses Turner 8972778e00 a/vk: Remove superfluous format assignment in the readback pool
This also caused a segfault when the readback pool filled up.
2022-02-20 00:51:26 -06:00
Jakob Bornecrantz 4ba68a7008 st/oxr: Remove direct access or mention of hmd distortion fov
The overrides didn't do anything unless Monado was compiled for
in-process, and even then the device might return a differnt fov.

The todo was for a driver and shouldn't be in the state tracker.
2022-02-19 13:45:26 +00:00
Jakob Bornecrantz ab5e863116 ipc: Do not copy fov in distortion information
No other distortion info is passed along
2022-02-19 13:22:25 +00:00
Christoph Haag 49b81e219f aux/util: Move fov from u_device_simple_info::views to top level 2022-02-19 13:04:32 +00:00
Christoph Haag 996a5d3e9a xrt: Move fov from xrt_view to xrt_hmd_parts::distortion 2022-02-19 13:04:32 +00:00
Christoph Haag 5e1805f04b build: Add sample driver to meson build 2022-02-19 13:04:32 +00:00
Moses Turner 86a1ba32e5 c/main: Add readback to gui_window_record 2022-02-18 20:26:27 -06:00
Moses Turner 2e8f572a4d aux/vk: Add util to read VkImages back to a pool of xrt_frames
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2022-02-18 20:26:27 -06:00
Moses Turner 43fb248271 c/main: Allow framebuffers to be transfer sources 2022-02-18 20:26:27 -06:00
Moses Turner 8f792c9165 u/sink: Add u_sink_create_to_r8g8b8_r8g8b8a8_r8g8b8x8_or_l8 2022-02-18 20:06:20 -06:00
Moses Turner 0dcc73d5cf st/gui: Support RGBA, unusual strides, and add higher bitrate option 2022-02-18 20:06:20 -06:00
Moses Turner 433ae0d9c6 aux/gst: Support RGBA and images with unusual row strides 2022-02-18 20:06:20 -06:00
Moses Turner 727c087366 aux/vk: Add helper for adding image memory barriers 2022-02-18 20:06:20 -06:00
Moses Turner 5a2088ee3e aux/vk: Add vkCmdBlitImage to vk_helpers 2022-02-18 20:06:20 -06:00
Moses Turner 3a7569a7b0 u/trace_marker: Add COMP_TRACE_IDENT 2022-02-18 20:06:20 -06:00
Moses Turner 00984aa021 aux/vk: Add advanced create image function 2022-02-18 20:06:20 -06:00
Moses Turner d8c33cd22d t/oxr: Come on, we can be more sparkly than that 2022-02-18 20:06:20 -06:00
Ryan Pavlik 4ecbcc2d27 d/wmr: Fix doxygen warning 2022-02-19 01:15:36 +00:00
Ryan Pavlik 80ab7243ca st/oxr: Additional doxygen fix 2022-02-19 01:15:35 +00:00
Ryan Pavlik de6e237a9f xrt: Additional doxygen fix. 2022-02-19 01:15:33 +00:00
Christoph Haag 5b1d15f143 d/survive: Change license to BSL, as originally intended 2022-02-19 00:55:54 +00:00
Christoph Haag b2e7fc0f11 d/survive: Add pragma once and c++ compatibility 2022-02-19 00:55:54 +00:00
Christoph Haag bab6858eb8 d/multi: Change license to BSL, as originally intended 2022-02-19 00:55:54 +00:00
Christoph Haag 43f0bb4343 xrt: Fix tracking override docs 2022-02-19 00:43:30 +00:00
Jakob Bornecrantz ba0f7cba8b aux/vk: More comments 2022-02-19 00:34:01 +00:00
Jakob Bornecrantz 5222dfd728 aux/vk: Refactor and document various compositor swapchain image flags
This also fixes two errors:
* VK_IMAGE_USAGE_SAMPLED_BIT was not always added to depth formats.
* VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT was added to image
  views for sampling, where the spec only allows one of them.
2022-02-18 21:32:05 +00:00
Jakob Bornecrantz 05771e7b9e aux/vk: Rename compositor swapchain image helper functions (NFC) 2022-02-18 21:32:05 +00:00
Jakob Bornecrantz ad5a057737 aux/vk: Refactor out swapchain functions to own file (NFC) 2022-02-18 21:32:05 +00:00
Jakob Bornecrantz 4539b74e56 aux/vk: Re-org one function (NFC) 2022-02-18 21:32:05 +00:00
Ryan Pavlik 9a440d9bce st/oxr: Fix doxygen warning 2022-02-18 21:22:32 +00:00
Ryan Pavlik 1eb6aecdc0 xrt: Improve docs and fix doxygen warnings 2022-02-18 21:22:32 +00:00
Ryan Pavlik 010599baa6 comp/main: Fix debug typo 2022-02-18 21:22:32 +00:00
Jakob Bornecrantz 20c7e30304 aux/vk: Remove unnecessary breaks 2022-02-18 18:29:28 +00:00
Jakob Bornecrantz 0126819f21 aux/vk: Use aspect mask that covers both depth and stencil for mixed formats 2022-02-18 18:29:28 +00:00
Christoph Haag c162ff655b st/oxr: add renderdoc API to xrBeginFrame/xrEndFrame
Usually renderdoc captures frames by hooking the present functions to
recognize when an application is finished rendering a frame.

OpenXR applications might not present to a window. Therefore use the
renderdoc API to capture application frames between xrBeginFrame and
and xrEndFrame.

This allows renderdoc to capture application frames without the need
to modify the application.
2022-02-18 13:44:15 +01:00
Christoph Haag 93bf83e8f6 xrt: Add clang format, disabling formatting in external 2022-02-18 13:44:15 +01:00
Jakob Bornecrantz 9a884931bb c/client: Use correct VkImageAspectFlags in barriers 2022-02-17 19:29:57 +00:00
Christoph Haag fc77db6eca comp/main: Fix debug print of available direct mode modes
fixes 3dfec5f1ab
2022-02-17 17:22:18 +01:00
Nova f2ec7a7dd5 d/survive: Add SURVIVE_DISABLE_HAND_EMULATION env variable 2022-02-17 13:20:59 +00:00
Jakob Bornecrantz 7f33a55c77 c/client: Wait on Vulkan clients to complete rendering 2022-02-17 00:39:53 +00:00
Christoph Haag 9cd3b47f94 st/oxr: Rework composition of head relation for xrLocateViews 2022-02-16 23:15:28 +00:00
Jakob Bornecrantz 9b656cde77 xrt: Remove xrt_device::get_view_pose
Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
2022-02-16 23:15:24 +00:00
Christoph Haag b81ab3f09a st/steamvr_drv: Use xrt_device_get_view_poses 2022-02-16 23:15:21 +00:00
Jakob Bornecrantz 49f95164a7 st/oxr: Use xrt_device_get_view_poses
Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
2022-02-16 23:15:16 +00:00
Jakob Bornecrantz 3eb921b899 c/main: Use xrt_device_get_view_poses 2022-02-16 23:15:14 +00:00
Jakob Bornecrantz 0511b319ba drivers: Implement xrt_device::get_view_poses
Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
2022-02-16 23:15:08 +00:00
Jakob Bornecrantz 223aa515fd u/device: Add u_device_get_view_poses helper 2022-02-16 23:15:07 +00:00
Jakob Bornecrantz be4f4969c0 ipc: Add support for xrt_device::get_view_poses 2022-02-16 23:15:06 +00:00
Jakob Bornecrantz 780f1763e3 xrt: Add xrt_device::get_view_poses function 2022-02-16 23:15:02 +00:00
Jakob Bornecrantz b322ff689b d/wmr: Add trace markers to some common functions 2022-02-16 22:25:55 +00:00