Commit graph

3364 commits

Author SHA1 Message Date
Ryan Pavlik d176b18598 a/util: Allow upc present offset to be variable. 2022-02-08 10:51:39 -06:00
Ryan Pavlik 2238aff403 a/util: Catch frame_id mismatch in u_pacing_compositor 2022-02-08 10:51:39 -06:00
Ryan Pavlik a2e1eb7e75 a/util: Have all timestamps be injected into pacing.
No more calling os_monotonic_get_ns() inside the pacing helpers.
Much better testability.
2022-02-08 10:51:39 -06:00
Ryan Pavlik 40caa24d4b c/main: Rename to calc_frame_pacing 2022-02-07 13:11:00 -06:00
Ryan Pavlik d969bc334f a/util: More pacing documentation 2022-02-07 13:11:00 -06:00
nima01 45466e419b d/wmr: Reverb G1 proximity sensor support 2022-02-02 02:27:55 +01:00
Jakob Bornecrantz 309c45f4c4 aux/bindings: Tidy 2022-01-31 22:43:09 +00:00
Jakob Bornecrantz 037b161fb4 aux/binding: Rename function 2022-01-31 22:43:09 +00:00
Jakob Bornecrantz f0a5f1977c aux/bindings: Add OpenXR Identifier 2022-01-31 22:43:09 +00:00
Simon Zeni 003acb4d5f meson: configure systemd service files only if systemd is found 2022-01-31 16:35:06 +00:00
Christoph Haag c9b1fcf572 comp/main: Re add accidentally deleted WINDOW_XCB case
Fixes 856d2d39c8
2022-01-25 22:22:02 +01:00
Christoph Haag 0640728969 t/steamvr: Attempt to fix spurious CI failure
fix suggested by thaytan.
2022-01-25 19:24:49 +00:00
Ryan Pavlik 856d2d39c8 comp/main: Simplify use of u_string_list 2022-01-24 16:34:45 -06:00
Ryan Pavlik 9b9e23be62 a/util: Add a new constructor and a new method to u_string_list 2022-01-24 16:34:45 -06:00
Ryan Pavlik d057f00b54 doc: Fix broken link 2022-01-24 14:08:06 -06:00
Christoph Haag 2ad634bd1e d/wmr: print json config on debug log level 2022-01-21 20:32:35 +00:00
Christoph Haag 6e339014a5 d/wmr: Add Medion Erazer X1000 2022-01-21 20:32:35 +00:00
Christoph Haag 45adabe135 d/wmr: Clarify comment in headset_map assert 2022-01-21 20:32:35 +00:00
Christoph Haag 88d55c6e22 d/wmr: Sort HP G2 controller PID to the other HP devices 2022-01-21 20:32:35 +00:00
Christoph Haag 96c09e06e7 d/wmr: consolidate interface getters
Moving them into one function makes it simpler to add more HMDs.
2022-01-21 20:32:35 +00:00
Ryan Pavlik c9889f776f xrt: Rename xrt_space_graph to xrt_relation_chain.
Rename all functions and instances accordingly as well,
and add documentation for all methods.
2022-01-21 19:54:30 +00:00
Colin Kinloch 0a783ca208 systemd: Use pkgconfig variable systemduserunitdir as unit install directory 2022-01-18 21:11:44 +00:00
Moses Turner 1b3dadbec5 gui/remote: add pose for XR_EXT_hand_tracking test 2022-01-18 15:02:40 -06:00
Moses Turner 2188d8afc2 d/remote: expose hand active state to remote gui 2022-01-18 14:33:11 -06:00
Moses Turner 7b3378b28a aux/tracking; st/gui: save/load calibration gui state to file 2022-01-18 17:18:43 +00:00
Moses Turner 254c233c76 util/u_config_json: add functions to save/load gui state to file 2022-01-18 17:18:43 +00:00
Moses Turner dfd576e0ab st/gui: skip mode selection if there's only one mode 2022-01-18 17:18:43 +00:00
Moses Turner c8b9bff356 st/gui: fix typo - Asymetric -> Asymmetric 2022-01-18 17:18:43 +00:00
Ryan Pavlik 6677d42642 a/util: Frame pacing docs and some error handling 2022-01-15 01:06:48 +00:00
Ryan Pavlik a7c22fd185 a/util: Rename u_render_timing to u_pacing_app and u_frame_timing to u_pacing_compositor.
They both control pacing, but for different uses. Neither actually performs any timing.
2022-01-15 01:06:48 +00:00
Ryan Pavlik 365b3ca8d4 a/util: Make display timing helper more configurable.
Also comment some display timing interfaces better.
2022-01-15 01:06:48 +00:00
Jakob Bornecrantz f0e27a88a3 xrt: Clarify call order on some compositor functions 2022-01-15 00:27:00 +00:00
Jakob Bornecrantz c272549802 xrt: Correctly tag out arguments 2022-01-15 00:05:38 +00:00
Christoph Haag f978f2691d aux/vk: Don't leak VkExtensionProperties 2022-01-13 23:48:44 +01:00
Christoph Haag a60fab80e6 c/main: Don't leak non_desktop_reply 2022-01-13 23:46:43 +01:00
Christoph Haag 147851ffdc aux/ft: Add some documentation comments 2022-01-13 23:07:57 +01:00
Christoph Haag a6935dcc4b c/main: Check surface counter flags 2022-01-13 23:07:46 +01:00
Christoph Haag 8fe465e88f c/main: Make VkDisplayKHR from direct mode accessible in target swapchain 2022-01-13 23:07:34 +01:00
Christoph Haag 73d75aa522 c/main: cache VkDisplayKHR in wayland direct mode window 2022-01-13 23:07:16 +01:00
Christoph Haag 3eecb0f991 aux/vk: Add vkGetPhysicalDeviceSurfaceCapabilities2EXT function 2022-01-13 23:07:16 +01:00
Christoph Haag 693aceb755 aux/vk: Add VK_EXT_display_control functions 2022-01-13 23:07:16 +01:00
Christoph Haag ec64a856b4 aux/vk: Use VK_DEBUG instead of U_LOG for vk device ext selection 2022-01-13 23:07:01 +01:00
Christoph Haag 8e020fac2d c/main: Add and enable VK_EXT_display_control optional device ext 2022-01-13 23:06:40 +01:00
Christoph Haag b7d179b1b3 c/main: Add display surface counter optional vk instance ext 2022-01-13 23:06:15 +01:00
Christoph Haag ff4d492b74 c/util: add optional vk instance extensions 2022-01-13 23:05:38 +01:00
Christoph Haag ce6339e237 c/main: Make more use of string list for device ext 2022-01-13 23:05:06 +01:00
Christoph Haag f34816872c c/main: Use u_string_list for vk extensions 2022-01-13 23:04:34 +01:00
Christoph Haag 171a3830b9 u/string_list: Add constructor from existing list 2022-01-13 23:04:17 +01:00
Christoph Haag ee366e16e5 c/main: rename extensions num -> count 2022-01-13 23:03:56 +01:00
Christoph Haag 13e3db6128 aux/vk: Add vkEnumerateInstanceExtensionProperties 2022-01-13 23:03:38 +01:00
Christoph Haag 7174545ee8 aux/vk: remove duplication of vk_get_loader_functions functionality 2022-01-13 23:03:38 +01:00
Christoph Haag 1ae1e695e2 c/util: Fix device extension list comment 2022-01-13 23:03:25 +01:00
Christoph Haag 20f265d9ae u/string_list: Add contains function 2022-01-13 22:37:25 +01:00
Christoph Haag 07ddac523c build: Build u_string_list with meson too 2022-01-13 22:37:25 +01:00
Christoph Haag 8d5847d5a9 comp: Fix running with XRT_COMPOSITOR_XCB_FULLSCREEN=1
It required XRT_COMPOSITOR_XCB_DISPLAY to be set to a valid display or the
swapchain creation would fail because the requested width x height was 0x0.

Now the first display with a size other than 0x0 is selected when the current
selected display is 0x0.

fixes #148
2022-01-13 20:50:48 +00:00
Christoph Haag 77f19161fb aux/binding: extract monado_binding earlier from list 2022-01-13 14:16:20 +01:00
Jakob Bornecrantz d8cce715da u/bindings: Remove duplicate paths in by_length 2022-01-13 14:01:44 +01:00
Christoph Haag 435503f2c4 aux/bindings: Further cleanup, use object members for Component
instead of passing json data around
2022-01-13 14:01:44 +01:00
Christoph Haag 450eb182d0 aux/bindings: Minor refactor of generator scripts 2022-01-13 14:01:44 +01:00
Christoph Haag 7917110e1c aux/bindings: Remove unnecessary pathgroup parameter 2022-01-12 23:03:30 +01:00
Christoph Haag 595ca11c68 aux/bindings: Don't generate invalid code for missing monado_binding
The closing } for a binding template was not written.
2022-01-12 23:03:30 +01:00
Christoph Haag 47801859e7 aux/bindings: Replace "feature" with "component" 2022-01-12 23:02:53 +01:00
Christoph Haag d0cdb8fcd3 st/oxr: Fix subactoin typo in comment 2022-01-12 23:02:53 +01:00
Christoph Haag a3cd52ae8f aux/bindings: Actually generate code to convert xrt_input_name enum 2022-01-12 23:02:53 +01:00
Christoph Haag 153280607f aux/bindings: Split function to convert input/output enums into two
xrt_input_name and xrt_output_name are actual different types.
2022-01-12 23:02:53 +01:00
Christoph Haag d36123927d comp: avoid an unnecessary struct copy for print modes 2022-01-12 21:57:18 +01:00
Christoph Haag 3dfec5f1ab comp: Don't omit first mode in debug print
Also avoid an unnecessary struct copy.
2022-01-12 21:53:47 +01:00
Christoph Haag cce2094290 t/steamvr: Fix build on meson 0.61.0
Context: https://github.com/mesonbuild/meson/issues/4717
Using a directory directory as input in a custom_target was deprecated and printed the message
"This will become a hard error in the future."
It did become a hard error now.

Fixes error
../src/xrt/targets/steamvr_drv/meson.build:52:0: ERROR: File resources does not exist.
on meson 0.61.0
2022-01-11 20:23:39 +01:00
Antonio Ospite 2b456da531 c/client: make sure layer_commit passes complete frames in comp_gl_client
Make sure `layer_commit` passes on complete frames in `comp_gl_client.c`
even when EGL_ANDROID_native_fence_sync is not available.

The `insert_fence` function defined in `comp_egl_client.c` and passed as
argument to `comp_egl_client::client_gl_compositor_init` is only setting
up a proper fence when EGL_ANDROID_native_fence_sync is available,
resulting in a no-op otherwise.

However the fact that the insert_fence function is still valid results
in the `glFlush` workaround from
`comp_gl_client::client_gl_compositor_layer_commit` not kicking in.

To fix this define a NULL `insert_fence` function when
EGL_ANDROID_native_fence_sync is not available, and while at it turn the
`glFlush` workaround into a `glFinish` for extra safety.

This ensures that frames are always complete after
`client_gl_compositor_layer_commit` has been called.
2022-01-06 14:54:55 +00:00
Jarvis Huang ac30e798d6 ipc/android: Extend timeout duration 2022-01-05 14:59:39 +00:00
Jarvis Huang 97100821d2 ipc/android: Add shutdown mechanism back 2022-01-05 14:59:39 +00:00
Jarvis Huang 9339e6022f ipc/android: Refactor and cleanup IPC glue code 2022-01-05 14:59:39 +00:00
Jarvis Huang 3bb151e4bf ipc/android: Avoid race condition/blocking main thread 2022-01-05 14:59:39 +00:00
Jarvis Huang f575a7a1a9 ipc/android: Remove watchdog delay if surface comes from client
When surface comes from client, it's not reuseable after
client exits. Removing the timeout so runtime can release all the
graphcis resources associated with surface.
2022-01-05 14:59:39 +00:00
Jarvis Huang 52cb2ef123 d/android: Stop thread function when device destoryed 2022-01-05 14:59:39 +00:00
Jarvis Huang 6a61ed5695 ipc/android: Stop runtime service when no clients connected 2022-01-05 14:59:39 +00:00
Jakob Bornecrantz ec537eb3aa st/oxr: Refactor extension parsing and verify extensions 2022-01-04 22:04:12 +00:00
Jakob Bornecrantz fe9191a708 st/oxr: Sort extension list 2022-01-04 18:58:35 +00:00
Moses Turner 683dc4ea56 gui: add SLAM Stereo option to calibrate gui 2022-01-04 18:19:17 +00:00
Moses Turner 17034f0283 aux/tracking: assert on fisheye mat size for fisheye path 2022-01-04 18:19:17 +00:00
Jakob Bornecrantz 5eb739bb1a ext/openxr: Update headers to 1.0.20 2022-01-04 18:12:55 +00:00
Simon Zeni 8b1d432b79 d/ht_ctrl_emu: fix crash and truncation warning 2021-12-24 15:19:51 -05:00
Mateo de Mayo 7e0d93e3fb tests: Add tests for quatexpmap interface functions and minor changes in their docs 2021-12-22 12:16:27 -03:00
Mateo de Mayo 70576c2f02 t/slam: Implement basic prediction from last tracked poses 2021-12-21 11:43:17 +00:00
Mateo de Mayo 090e465dda external: Add semver to slam_tracker (1.0.0) and pose timestamps 2021-12-21 11:43:17 +00:00
Mateo de Mayo 88a3848b5a d/wmr: Map wmr_source data to monotonic clock 2021-12-21 11:43:17 +00:00
Mateo de Mayo 74e149159b t/slam: Add SLAM_SUBMIT_FROM_START envvar
Useful for setups that need some tuning to their sensors before sending
data to a SLAM system.
Removes the submit_frames property from wmr_camera as this replaces it.
2021-12-21 11:43:17 +00:00
Mateo de Mayo 1c7323f1c2 d/rs: Generalize laser emitter option setup to any rs option 2021-12-21 11:43:17 +00:00
Mateo de Mayo fa431fc010 d/rs: Map all rs_hdev timestamps to monotonic clock 2021-12-21 11:43:17 +00:00
Mateo de Mayo 76d7729e4d m/vec3: Add operator/ for scalar division 2021-12-21 11:43:17 +00:00
Mateo de Mayo bcb4cd82cd aux/math: Use dt in calculation of ang vel between quat diference 2021-12-21 11:43:17 +00:00
Mateo de Mayo 3e8a070e93 u/var: Add u_var_combo 2021-12-21 11:43:17 +00:00
James Hogan 7ee8d1ac5d
xrt: Revert xrt_view::display::{w|h}_pixels changes
Commit 749723f0ba ("xrt: Remove xrt_view::display::{w|h}_meters")
accidentally removed some references to {w|h}_pixels as well as
{w|h}_meters. This resulted in recommended view image sizes of 0px*0px.

Revert those changes without reverting the rest of the commit.

Fixes: 749723f0ba ("xrt: Remove xrt_view::display::{w|h}_meters")
2021-12-20 23:00:40 +00:00
Moses Turner 5635cd3885 ipc: fix typo - connec -> connect 2021-12-20 06:21:36 -06:00
Simon Zeni 4e4e6708bc Revert "d/survive: ajust timestamp from button event"
This reverts commit b396c200d0.

The issue has been fixed in libsurvive [1]

[1]: https://github.com/cntools/libsurvive/pull/250
2021-12-17 13:40:53 -05:00
Moses Turner a19f13171b meson: use cjson_include with depthai driver 2021-12-14 14:12:42 +00:00
Christoph Haag b7c8a6faa5 d/ht_ctrl_emu: work around truncation warning
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp: In function ‘int cemu_devices_create(xrt_device*, xrt_device*, xrt_device**)’:
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp:439:102: warning: ‘ Left Hand’ directive output may be truncated writing 10 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
  439 |                 int ret = snprintf(cemud[i]->base.str, XRT_DEVICE_NAME_LEN, i ? "%s Right Hand" : "%s Left Hand", hands->str);
      |                                                                                                      ^~~~~~~~~~
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp:439:35: note: ‘snprintf’ output between 11 and 266 bytes into a destination of size 256
  439 |                 int ret = snprintf(cemud[i]->base.str, XRT_DEVICE_NAME_LEN, i ? "%s Right Hand" : "%s Left Hand", hands->str);
      |                           ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp:439:84: warning: ‘ Right Hand’ directive output may be truncated writing 11 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
  439 |                 int ret = snprintf(cemud[i]->base.str, XRT_DEVICE_NAME_LEN, i ? "%s Right Hand" : "%s Left Hand", hands->str);
      |                                                                                    ^~~~~~~~~~~
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp:439:35: note: ‘snprintf’ output between 12 and 267 bytes into a destination of size 256
  439 |                 int ret = snprintf(cemud[i]->base.str, XRT_DEVICE_NAME_LEN, i ? "%s Right Hand" : "%s Left Hand", hands->str);
      |                           ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-12-14 14:58:33 +01:00
Christoph Haag 2b101e6ffa d/wmr: don't print NULL value in error message
In file included from ../src/xrt/drivers/wmr/wmr_config.h:15,
                 from ../src/xrt/drivers/wmr/wmr_config.c:16:
In function ‘wmr_config_parse_camera_config’,
    inlined from ‘wmr_config_parse_calibration’ at ../src/xrt/drivers/wmr/wmr_config.c:422:8,
    inlined from ‘wmr_hmd_config_parse’ at ../src/xrt/drivers/wmr/wmr_config.c:477:13:
../src/xrt/auxiliary/util/u_logging.h:84:25: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
   84 |                         u_log(__FILE__, __LINE__, __func__, level, __VA_ARGS__);                                       \
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/xrt/auxiliary/util/u_logging.h:220:38: note: in expansion of macro ‘U_LOG_IFL’
  220 | #define U_LOG_IFL_E(cond_level, ...) U_LOG_IFL(U_LOGGING_ERROR, cond_level, __VA_ARGS__)
      |                                      ^~~~~~~~~
../src/xrt/drivers/wmr/wmr_config.c:22:35: note: in expansion of macro ‘U_LOG_IFL_E’
   22 | #define WMR_ERROR(log_level, ...) U_LOG_IFL_E(log_level, __VA_ARGS__)
      |                                   ^~~~~~~~~~~
../src/xrt/drivers/wmr/wmr_config.c:267:17: note: in expansion of macro ‘WMR_ERROR’
  267 |                 WMR_ERROR(log_level, "Invalid camera calibration block %d - unknown camera purpose %s", c->n_cameras,
      |                 ^~~~~~~~~
../src/xrt/drivers/wmr/wmr_config.c: In function ‘wmr_hmd_config_parse’:
../src/xrt/drivers/wmr/wmr_config.c:267:100: note: format string is defined here
  267 |                 WMR_ERROR(log_level, "Invalid camera calibration block %d - unknown camera purpose %s", c->n_cameras,
      |                                                                                                    ^~
2021-12-14 14:54:47 +01:00
Christoph Haag 42ae21d412 d/hdk: Remove unused variable 2021-12-14 14:19:53 +01:00
Christoph Haag d4a491ea74 targets/steamvr: Use python stdlib to copy
monado/src/xrt/targets/steamvr_drv/copy_assets.py:8: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.dir_util import copy_tree

monado/src/xrt/targets/steamvr_drv/copy_assets.py:8: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.dir_util import copy_tree
2021-12-14 14:17:57 +01:00