Commit graph

5097 commits

Author SHA1 Message Date
Christoph Haag 6a01170b23 ipc: Transfer xdev serial over ipc 2023-06-14 01:02:07 +00:00
Robbie Bridgewater 28dc5747e2 ipc: Add more diagnostic info for first instance service failure 2023-06-14 01:01:49 +00:00
Jakob Bornecrantz 315861501c a/vive: Move VIDs and PIDs to helper library [NFC] 2023-06-14 00:23:26 +01:00
Jakob Bornecrantz 205d82ce9c a/vive: Add common header with documentation [NFC] 2023-06-14 00:23:26 +01:00
utzcoz 287102d256 t/android: Declare INTERNET permission for remote driver
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-06-13 21:08:01 +00:00
utzcoz 58193ad1c4 d/remote: Support r_hub for Windows
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-06-13 21:08:01 +00:00
Linus Lüssing d7468d22da d/wmr: fix squeeze trigger in SteamVR
While in the Monado debug GUI the squeeze trigger is detected fine and
it is also listed in the SteamVR "Test Controller" page, pushing the
squeeze trigger would not be detected in SteamVR.

Fixing this by not just populating the xrt_inputs squeeze click but also
the squeeze value.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2023-06-13 20:28:05 +00:00
Linus Lüssing fca4ac41e5 d/wmr: avoid using non-self-explanatory numbers for input allocations
By using an extra, final entry in the according inputs enum instead
of using a hard coded number it should be slightly safer and easier
to verify that the to be allocated inputs array is of correct size.

No functional change.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2023-06-13 20:28:05 +00:00
Drew Chien (Te-Ju) 9f1cf952c6 st/oxr: Add eye gaze support 2023-06-13 01:37:50 +01:00
Drew Chien (Te-Ju) aefeeb1403 a/bindings: Add eye gaze support 2023-06-13 01:37:45 +01:00
Drew Chien (Te-Ju) 96c88f488e xrt: Add eye gaze defines and role 2023-06-13 01:31:11 +01:00
Jan Schmidt 9966c16cdd d/wmr: Publish Reverb G2 tunnelled controllers
If there are HMD-tunnelled controllers present,
publish them in the prober and builder so they
can be used.
2023-06-08 16:12:18 +00:00
Jan Schmidt e356d57a6a d/wmr: Initial tunnelled controller handling.
Create controller devices when a presence
message indicates one is paired and online.

Pass controller IMU/button reports to the
controller device.
2023-06-08 16:12:18 +00:00
Jan Schmidt 89407f8de8 d/wmr: Infrastructure for tunnelled controller connections
Add a connection object for controllers that are tunnnelled
through the HMD, and calls to allow send/receive of packets
as needed.
2023-06-08 16:12:18 +00:00
Christoph Haag 351dd9b9de c/util: Implement wait_image in comp_swapchain 2023-06-08 17:01:12 +01:00
Christoph Haag cd37974c04 xrt: Add swapchain_[dec|inc]_image_count functions 2023-06-08 17:01:12 +01:00
Andrei Aristarkhov eace6e310d c/util: prevent sporadic xrAcquireSwapchainImage failure under high GPU load 2023-06-08 17:01:12 +01:00
Christoph Haag 1451bd9993 os/time: Add windows impl of os_realtime_get_ns 2023-06-08 17:01:12 +01:00
Robbie Bridgewater c91928f39e st/oxr: Use CMake-derived version constants for OpenXR runtime version 2023-06-07 15:22:32 -05:00
Robbie Bridgewater 44d7b8489c a/util: Set version constants from CMake 2023-06-07 15:22:22 -05:00
Robbie Bridgewater 03780e9ced a/util: Set colors for various zones when supported by TRACY 2023-06-07 15:20:52 -05:00
Linus Lüssing 7e14d7eb76 d/wmr: fix controller activation in SteamVR
SteamVR requires the serial number to be set. Otherwise after creating
the controller it will fail to activate it.

Before:

  ...
  monado: Creating Controller WMR Left Controller
  monado: Using Monado Controller profile
  monado: Render model based on Monado: locator_one_sided
  monado: get controller serial number:
  Driver 'monado' attempted to add tracked device with no serial number
  monado: Added left Controller: WMR Left Controller
  monado: Creating Controller WMR Right Controller
  monado: Using Monado Controller profile
  monado: Render model based on Monado: locator_one_sided
  monado: get controller serial number:
  Driver 'monado' attempted to add tracked device with no serial number
  monado: Added right Controller: WMR Right Controller
  ...

After:

  monado: Creating Controller WMR Left Controller
  monado: Using Monado Controller profile
  monado: Render model based on Monado: locator_one_sided
  monado: get controller serial number: Left Controller
  Driver 'monado' started activation of tracked device with serial number 'Left Controller'
  monado: Added left Controller: WMR Left Controller
  monado: Creating Controller WMR Right Controller
  monado: Using Monado Controller profile
  monado: Render model based on Monado: locator_one_sided
  monado: get controller serial number: Right Controller
  Driver 'monado' started activation of tracked device with serial number 'Right Controller'
  monado: Added right Controller: WMR Right Controller

With this change the HP Reverb G2 controller is recognized and activated
fine in SteamVR for me. "Active Controller" nows says:
"monado_hp_mixed_reality_controller". The SteamVR controller test page
now works and recognizes button presses. The controllers can also
(kind of) be used in the home environment.

Several issues still exist to be fully useable:

* middle finger button not recognized in the SteamVR test page
  (all other buttons seem to work)
* high gyro drift
* no positional tracking

The serial is set to "Left Controller" and "Right Controller" for now,
just like for the Rift S controller. This should probably be updated to
a proper serial number once read_controller_config() can parse it from
the firmware.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2023-06-07 20:20:12 +00:00
Jan Schmidt 948d78fb61 d/wmr: Change public name for G2 controllers
Change the published device name for G2 controllers from the
generic 'WMR Controller'
2023-06-07 02:10:49 +00:00
Jan Schmidt 4b4fc2b73d d/wmr: Update comments in controller_base
Expand some comments about what different packets do and fix
the description of controller connection lifetimes
2023-06-07 02:10:49 +00:00
Jan Schmidt 7009c64326 d/wmr: Cache controller configs
Store controller calibration block into a cache file and
use that if available, to save time on subsequent startups

Re-disable reading of extra firmware blocks, accidentally
left enabled during recent controller/connection splitup
2023-06-07 02:10:49 +00:00
Jan Schmidt ac84cd4d52 util/u_file: Add u_file_open_file_in_config_dir_subpath()
Add a utility function for accessing files in subdirectories
of the main config dir, creating the subpath as needed.
2023-06-07 02:10:49 +00:00
sdegrande 2f3f9e0cb9 build,a/{os,util},xrt,ipc: Fix compilation with Mingw64 on MSYS2
Main changes:
- use the pthread lib provided by Mingw64
- include windows.h where needed
- define XRT_ENV_MINGW
2023-06-05 12:03:47 -05:00
Jakob Bornecrantz 8a002db4f4 d/rift_s: Make sure to depend on sinks 2023-06-02 16:41:37 +00:00
Robbie Bridgewater 111f269040 xrt: Add XRT_INPUT_GENERIC_[STAGE|LOCAL]_SPACE_POSE
Add XRT_INPUT_GENERIC_STAGE_SPACE_POSE and XRT_INPUT_GENERIC_LOCAL_SPACE_POSE to allow dynamically adjusting these poses.
2023-06-02 15:23:04 +00:00
Linus Lüssing b49ff83a3e Fix segfault with WMR controllers and SteamVR-Monado plugin
With the Reverb G2 controllers connected to the Linux host system via
Bluetooth the following segmentation fault occurs for me when starting
SteamVR with the SteamVR-Monado plugin installed:

```
  $ gdb ...
  ...
  (gdb) bt
  #0  0x0000000000000000 in ?? ()
  #1  0x00007f82de21bac7 in CDeviceDriver_Monado_Controller::RunFrame (this=0x7f82bc610e40)
      at /home/linus/dev-priv/vr/monado/src/xrt/state_trackers/steamvr_drv/ovrd_driver.cpp:966
  #2  0x00007f82de218b5d in CServerDriver_Monado::RunFrame (this=0x7f82de7c6ca0 <g_serverDriverMonado>)
      at /home/linus/dev-priv/vr/monado/src/xrt/state_trackers/steamvr_drv/ovrd_driver.cpp:1574
  #3  0x00000000004b7a77 in ?? ()
  #4  0x0000000000000000 in ?? ()
  (gdb) l /home/linus/dev-priv/vr/monado/src/xrt/state_trackers/steamvr_drv/ovrd_driver.cpp:966
  959			if (m_xdev->hand_tracking_supported && m_skeletal_input_control.control_handle) {
  960				vr::VRBoneTransform_t bone_transforms[OPENVR_BONE_COUNT];
  961
  962				timepoint_ns now_ns = os_monotonic_get_ns();
  963				struct xrt_hand_joint_set out_joint_set_value;
  964				uint64_t out_timestamp_ns;
  965
  966				m_xdev->get_hand_tracking(m_xdev,
  967				                          m_hand == XRT_HAND_LEFT ? XRT_INPUT_GENERIC_HAND_TRACKING_LEFT
  968				                                                  : XRT_INPUT_GENERIC_HAND_TRACKING_RIGHT,
  969				                          now_ns, &out_joint_set_value, &out_timestamp_ns);
```

This happens because the "m_xdev->hand_tracking_supported" flag is set
but m_xdev->get_hand_tracking() is not implemented for WMR controllers.

Fixing this crash by setting hand_tracking_supported to false for
WMR controllers for now until get_hand_tracking() is implemented.

Link: https://gitlab.freedesktop.org/monado/monado/-/issues/251
Fixes: c4db3dfccc ("d/wmr: Add basic Reverb (G1, Bluetooth) motion controller support.")
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2023-06-02 04:33:07 +02:00
Korcan Hussein 17d8e010c8 xrt: App enabled extension state
Adds support for passing through which extensions an OpenXR client
has enabled to server for drivers/compositors to be able to query.
2023-05-25 23:20:38 +01:00
Mateo de Mayo a860a7f40e t/slam: Implement new prediction using latest IMU samples for everything 2023-05-24 12:07:18 +00:00
Jakob Bornecrantz 5b8a68fce5 d/dai: Do some tracing on IMU samples 2023-05-23 14:42:21 +01:00
Jakob Bornecrantz b6a1a2b390 d/dai: Add env variables to tweak IMU settings
Add make code able to accept 1 and 2 samples in a batch.
2023-05-23 14:42:21 +01:00
Jakob Bornecrantz 9def97ebb8 d/dai: Set thread names and tweak printing 2023-05-23 11:48:11 +01:00
Jakob Bornecrantz 0257556763 d/dai: Tidy includes 2023-05-23 11:48:11 +01:00
Jarett Millard fe6d584712 d/pssense: Implement controller vibration and CRC check for input reports 2023-05-23 07:42:00 +00:00
Ryan Pavlik e3ce528703 cmake: Adjust build so that CPack makes a better deb file.
Not as good as the native one, but better.
2023-05-22 14:24:03 -05:00
Jakob Bornecrantz 1f632bcfb9 d/vive: Improve and refactor IMU time calculation 2023-05-22 11:51:07 +01:00
Jakob Bornecrantz 70850472b2 d/vive: Drain all imu packets at startup 2023-05-22 11:44:33 +01:00
Jakob Bornecrantz 7f1c5e9bd5 d/vive: Tidy header includes 2023-05-22 11:44:33 +01:00
Jakob Bornecrantz 647fd366c5 c/render: Remove compute default_sampler 2023-05-21 12:03:04 +01:00
Jakob Bornecrantz 27ba15cb24 c/util: Remove comp_swapchain_image samplers
No longer used, they where all the same.
2023-05-21 12:03:04 +01:00
Jakob Bornecrantz 1644812dc5 c/main: Remove layer renderer framebuffer sampler 2023-05-21 12:03:04 +01:00
Jakob Bornecrantz 82453bab57 c/main: Use new samplers
The swapchain code was creating a whole bunch of samplers, two for each image.
The thought was that samplers might depend on format, but this was not the
case. So just add a few common ones on the render_resources structs and use
them everywhere. Also fixes the bleeding distortion problem.
2023-05-21 12:03:04 +01:00
Jakob Bornecrantz ee66760b63 c/main: Log assert case 2023-05-21 12:03:04 +01:00
Jakob Bornecrantz 44d2dbc268 c/main: Init gfx & compute render resources earlier 2023-05-21 12:03:04 +01:00
Jakob Bornecrantz 8d738248b0 c/render: Add and use new samplers 2023-05-21 12:03:04 +01:00
utzcoz 7b8d3c0907 d/remote: Remove unused clang-format comment [NFC]
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-05-21 10:44:04 +00:00
Moshi Turner 276fbc8113 d/dai: Add live control of floodlight brightness 2023-05-21 08:56:14 +01:00
Jakob Bornecrantz 7d11036e29 d/ht: Log if we can not find hand-tracking directory 2023-05-20 22:38:16 +01:00
Jakob Bornecrantz ab2b88d417 u/file: Search more paths for hand-tracking models 2023-05-20 21:10:31 +01:00
utzcoz b466d1d338 cmake: Remove extra empty lines [NFC]
Signed-off-by: utzcoz <utzcoz@outlook.com>
2023-05-20 15:17:27 +08:00
Jakob Bornecrantz 023d5bf232 c/main: Support compute queue in mirror code 2023-05-19 23:36:41 +01:00
Jakob Bornecrantz 44c81b6ddb c/main: Refactor out mirror_to_debug_gui code 2023-05-19 23:36:41 +01:00
Jakob Bornecrantz f359826363 c/main: Fix readback timing information 2023-05-19 23:36:41 +01:00
Jakob Bornecrantz 3b5e84fd6f c/shaders: Add blit compute shader 2023-05-19 23:36:41 +01:00
Jakob Bornecrantz 53f96ed20d a/vk: Add vkCmdPushConstants 2023-05-19 23:18:29 +01:00
Jakob Bornecrantz b5a40a1b50 a/vk: Make it possible to select vk format in readback pool 2023-05-19 23:18:29 +01:00
Jakob Bornecrantz e10a37d39a u/pacing: Add env variable to set present to display offset 2023-05-19 21:09:20 +00:00
Jakob Bornecrantz 96e8aba770 u/pacing: Explain min app time more 2023-05-19 21:09:20 +00:00
Jakob Bornecrantz d5a7b8ad13 u/pacing: Add u_var tracking to app pacer 2023-05-19 21:09:20 +00:00
Jakob Bornecrantz c658cc7f4d m/ff: Add comments to C++ wrapper 2023-05-19 21:05:52 +00:00
Jakob Bornecrantz d7df4f9b9a m/ff: Rename field to follow style guide in C++ wrapper 2023-05-19 21:05:52 +00:00
Jakob Bornecrantz 2d725756f2 m/ff: Return value from m_ff_vec3_f32_get in C++ wrapper 2023-05-19 21:05:52 +00:00
Jakob Bornecrantz a519c5ae6b m/ff: Add function to get internal fifo in C++ wrapper 2023-05-19 21:05:52 +00:00
Jakob Bornecrantz c19fbce8c3 st/gui: Make it possible to inhibit sinks gui headers 2023-05-19 20:43:06 +00:00
Jakob Bornecrantz 17b8a979e5 st/gui: Make debug sinks be opened by default 2023-05-19 20:43:06 +00:00
Jakob Bornecrantz 06e8ff8350 u/var: Improve documentation 2023-05-19 20:43:06 +00:00
Jakob Bornecrantz 5b529e50cb ext/tracy: Fix compile when TRACY_HAS_CALLSTACK is not set 2023-05-19 20:43:06 +00:00
Jakob Bornecrantz e21c3a7afe st/gui: Add some tracing 2023-05-19 18:32:20 +01:00
Jakob Bornecrantz 667e6e73fa u/debug_gui: Add some tracing 2023-05-19 18:32:20 +01:00
Jakob Bornecrantz a5de76095a u/debug_gui: Refactor loop 2023-05-19 18:32:20 +01:00
Mis012 19f87ba217 d/pssense: Replace uint with uint32_t in pssense_driver.c
The type "uint" doesn't seem to exist on some platforms at least
(for example alpine linux), and it's only used in a single file,
so it seems like a good idea to change the two uses to "uint32_t".

Closes #258
2023-05-19 16:17:42 +01:00
Jakob Bornecrantz 66a9131dd9 st/oxr: Guard against xsysc being NULL 2023-05-18 12:22:57 +01:00
Jakob Bornecrantz d79678aeec st/oxr: Always create the system compositor
Some apps will enable headless and vulkan, then use Vulkan.
2023-05-18 12:22:57 +01:00
Jakob Bornecrantz 288ee57fd2 d/survive: Get FoV from config struct 2023-05-18 11:12:06 +01:00
Jakob Bornecrantz b84d1dfa00 d/vive: Get FoV from config struct 2023-05-18 11:12:06 +01:00
Jakob Bornecrantz 9f5e8963a9 a/vive: Add tweaks for FoV values 2023-05-18 11:12:06 +01:00
Jakob Bornecrantz 7b691ccab7 a/vive: Generate FoV values in config 2023-05-16 23:34:33 +01:00
Jakob Bornecrantz 62c483301c a/vive: Order CMakeLists.txt files [NFC] 2023-05-16 23:34:33 +01:00
Jakob Bornecrantz d984950be1 a/vive: Make imu config return be a out variable [NFC] 2023-05-16 23:34:33 +01:00
Jakob Bornecrantz b93ed31cce a/vive: Constify config argument to get functions [NFC] 2023-05-16 23:34:32 +01:00
Jakob Bornecrantz 5e0b21cd18 a/vive: Tidy vive_config.h [NFC] 2023-05-16 23:34:32 +01:00
Jakob Bornecrantz 54083a99de a/vive: Tidy vive_config.c [NFC] 2023-05-16 23:34:32 +01:00
Jakob Bornecrantz 67dd88ec4a a/vive: Refactor out calibration getters into own file [NFC] 2023-05-16 23:34:32 +01:00
Jakob Bornecrantz 3487923eab d/qwerty: Remove old prober code 2023-05-16 22:25:05 +00:00
Jakob Bornecrantz fb30f5e077 t/common: Put simulated, remote and qwerty higher up in list 2023-05-16 22:25:05 +00:00
Jakob Bornecrantz be58024ffb t/common: Add Qwerty builder 2023-05-16 22:25:05 +00:00
Jakob Bornecrantz 76c5d677d7 d/qwerty: Add helper create function 2023-05-16 22:25:05 +00:00
Jakob Bornecrantz ef59d8e85d d/qwerty: Tidy header [NFC] 2023-05-16 22:25:05 +00:00
Ryan Pavlik ae6b0ad445 st/p,t/common: Protect tracker-creation calls 2023-05-16 22:04:53 +00:00
Ryan Pavlik cd79bef0cf cmake: Fix build flags on MSVC 2023-05-16 22:04:53 +00:00
Ryan Pavlik f0cc05d09b cmake: Turn off two drivers that are currently incompatible with MSVC 2023-05-16 22:04:53 +00:00
Ryan Pavlik 173b36c3a2 t/sdl_test: Fix macro collision on Windows 2023-05-16 22:04:53 +00:00
Ryan Pavlik 8603e5d63e i/client: Fix return type incompatibility on Windows 2023-05-16 22:04:53 +00:00
bjorn d16576252f c/main: Fix XRT_COMPOSITOR_FORCE_WAYLAND_DIRECT; 2023-05-16 14:40:10 -07:00
samuel degrande ea7ec1bda8 xrt: Fail to build with Clang 16 2023-05-16 14:25:36 +00:00
Christoph Haag 2f4a926184 t/legacy: Ensure all legacy drivers can be disabled [NFC] 2023-05-16 08:53:55 +00:00
samuel degrande 1ad168cfc5 cmake: Fix build failure on msys2/mingw64
This is due to the use of `${SDL2_LIBRARIES}` over `SDL2::SDL2`.

On some 'old' OSes such as Ubuntu 20.04, the SDL2 CMake config does
not set an SDL2:SDL2 target but rather defines SDL2_LIBRARIES and
SDL2_INCLUDE_DIRS variables.

This patch creates an SDL2::SDL2 target, if not already set, based on
those 2 variables.
2023-05-15 16:41:34 +00:00