Commit Graph
897 Commits
Author SHA1 Message Date
Patrick Nicolas 4fb50ed556 Update Monado 2026-07-29 23:40:21 +02:00
Patrick Nicolas 49276fd5d8 Update Monado 2026-07-29 21:33:19 +02:00
Jonathan Steffan 86e58449c2 feat(vulkan): use distro Vulkan packages instead of setup-vulkan-sdk
With the pinned SDK gone, CI builds against distro headers, so raise the
server requirement to 1.4.304 to match what is actually tested and
supported: Ubuntu 26.04 has 1.4.341, the Ubuntu package build (plucky)
has 1.4.304, as does Debian 13. This subsumes the separate 1.3.283 check
for Vulkan video encode, and makes VK_HEADER_VERSION >= 304 always true
for the server. The client conditionals stay, it is built for Android
against the 1.3.268 headers fetched in common/CMakeLists.txt.
2026-07-26 10:16:46 +02:00
Patrick Nicolas 4d1de2eab9 Don't collect copy times for iGPU (vulkan encoder) 2026-07-14 20:15:53 +02:00
Patrick Nicolas eed9e052fc Correctly report if tracing is enabled 2026-07-14 20:15:53 +02:00
umceko e57577d675 Fix main queue synchronization with monado
copy_mutex duplicated the pthread_mutex_t of vk.queue.mutex into
main_queue->mutex by value, which creates an independent mutex: monado
submissions on IPC client threads (comp_swapchain image transitions,
vkDeviceWaitIdle in image_cleanup) did not exclude wivrn's layer_commit
and encoder submissions on the same VkQueue. This intermittently
corrupts driver state when a client creates or destroys swapchains
while streaming, observed as SIGSEGV inside vkQueueSubmit2 and as
uncaught vk::SystemError from layer_commit on NVIDIA.

Initialize monado's queue mutexes and redirect vk.queue.mutex to the
main queue os_mutex so every submitter takes the same lock.
2026-07-14 09:25:35 +02:00
Sapphire 22f3dfda88 Set position & orientation tracked bits when valid on Meta body trackers 2026-07-11 18:04:23 -05:00
Patrick Nicolas 1d1c040299 remove public audio description() method 2026-07-11 14:46:53 +02:00
SapphireandGuillaume Meunier 1cc61fd07a Make virtual tracker xdevs toggleable
Co-authored-by: Guillaume Meunier <[email protected]>
2026-07-10 14:52:50 -05:00
Sapphire 727445520e Create xdevs from body skeleton 2026-07-10 13:22:14 -05:00
Sapphire e611fdcc51 Add velocity for htc_body 2026-07-10 13:22:14 -05:00
Sapphire 534b4c23e3 Use shared pose_flags enum in packets 2026-07-10 13:22:13 -05:00
Sapphire 2e28b0a4ad Forward body skeletons from headset 2026-07-10 13:22:05 -05:00
Patrick Nicolas 41c2c0b727 Set default log level to info 2026-07-09 23:34:42 +02:00
Patrick Nicolas d609d039d8 remove ifdef for socket cleanup 2026-07-09 21:06:32 +02:00
JR Lanteigne 91f6e69ffb Mirror forwarded input devices to uinput
Mirror the gamepad forwarded from the headset to a uinput device with the standard Xbox layout, so applications that do not read it through OpenXR, such as SDL and Steam Input, pick it up. This extends the existing hid-forwarding uinput path, which already covered keyboard and mouse.

The headset chooses which devices to forward (keyboard, mouse, gamepad), off by default. The hid-forwarding server option gates the uinput mirror only; the OpenXR gamepad is always exposed. The mirror needs the uinput module and write access to /dev/uinput.

Gamepad rumble written to the uinput device is read back and forwarded to the headset as OpenXR haptics.
2026-07-08 19:10:50 +02:00
JR Lanteigne aeecc857de Add gamepad forwarding through OpenXR
Forward a gamepad paired to the headset to the server. Useful when the controller is in range of the headset but not the server, such as a DualSense paired to a Quest over Bluetooth.

The headset reads the gamepad through the OpenXR microsoft/xbox_controller profile and forwards it on the existing input rails: gamepad device ids in the inputs packet, plus a gamepad entry in the interaction profile array that signals connection and disconnection from the tracking thread.

The server exposes a native OpenXR gamepad at /user/gamepad, connected while the headset reports a gamepad interaction profile. This needs no permission and is always available.

Rumble is sent back to the headset and applied through OpenXR haptics.
2026-07-08 19:10:50 +02:00
HttpAnimationsandHttpAnimations 6ad8f4546b Fix assertion failure in foveation fill_ubo when count is exhausted (#1002)
Co-authored-by: HttpAnimations <[email protected]>
2026-07-03 21:50:26 +02:00
Patrick Nicolas c4a54b29ec Retrieve view pose when needed by a layer
In the layer squasher, world pose is retrieved from a projection layer
if possible, but the eye pose is incorrect in that case.
Get the data from hmd if it is needed by any of the layers.
2026-07-02 07:51:36 +02:00
Jonathan Steffan b9c8a54d92 Add WiVRn-native Perfetto via Perfetto SDK
Optional server profiling built on the Perfetto SDK. Adds CPU spans
(compositor, encoder, network), GPU encode/copy slices from Vulkan timestamp
queries (Vulkan/NVENC/VAAPI), and headset feedback markers from dump_time.

WIVRN_TRACING enables tracing and selects the backend (system, inprocess, or
both); WIVRN_USE_PERFETTO gates it at build time and compiles it out otherwise.
WIVRN_TRACE_MONADO additionally drives Monado's percetto tracing from the same
switch so WiVRn and Monado land on one timeline.

Tooling: server-tracing[-monado] presets and a CI build, two Perfetto configs
(WiVRn-only and full-system), a wivrn_capture.py capture wrapper, a pftrace
summary script, and docs/profiling.md.
2026-07-01 21:04:08 +02:00
Jonathan Steffan 79ee65e158 Remove dead cleanup-function mechanism 2026-07-01 20:48:17 +02:00
Jonathan Steffan 52dc629310 Remove PulseAudio audio backend
PipeWire is the modern, preferred backend. Remove the now-redundant
PulseAudio backend entirely.
2026-07-01 20:48:17 +02:00
Sapphire f434d52f7f Simplify steam command delimiter logic
This should also fix there being leading whitespace before the
VR_OVERRIDE environment variable.
2026-06-28 18:56:39 -05:00
Patrick Nicolas 39ba5041e2 Use specialization constant for alpha/non-alpha 2026-06-18 23:27:31 +02:00
Patrick Nicolas 32b4baff70 More cache-friendly swizzle 2026-06-18 23:27:31 +02:00
Patrick Nicolas a5bca21706 Relax flags for foveation UBO 2026-06-18 23:27:31 +02:00
Patrick Nicolas 5f734fd1dd Fix vulkan error with 0 layers submitted 2026-06-18 15:55:24 +02:00
Patrick Nicolas d294a80678 Clear image when no layers are submitted 2026-06-18 09:59:58 +02:00
Patrick Nicolas 51e887ed1f Cleanup active_runtime.json on start 2026-06-17 22:01:51 +02:00
Patrick Nicolas 9940580fbd Don't forward 0 refresh rate to headset 2026-06-13 23:05:52 +02:00
Patrick Nicolas 43395e6e40 Add logs for refresh rate change 2026-06-13 23:05:52 +02:00
Patrick Nicolas c485bd10d3 Log selected OpenVR compatibility library 2026-06-13 14:06:44 +02:00
Patrick Nicolas 1fc70945cb Downgrade message for vk queue family indices 2026-06-09 21:07:46 +02:00
Patrick Nicolas e16e713cb6 fix deadlock on reconnect 2026-06-09 19:22:36 +02:00
Patrick Nicolas b387623aac Update Monado 2026-06-06 11:06:44 +02:00
Patrick Nicolas 468b30dec4 Fix debug build 2026-05-28 18:13:01 +02:00
Patrick Nicolas 1d8f8b4779 Ignore extreme values for app CPU/GPU time 2026-05-27 11:15:20 +02:00
EasonZxp 28c72c8e64 Add PFDM MR controller support 2026-05-26 10:52:34 +02:00
Patrick Nicolas 1f71ade4f1 Configurable max number of vulkan encoders 2026-05-19 14:20:57 +02:00
Patrick Nicolas 9313ccbc1d Use multiple vulkan encode queues if possible 2026-05-19 06:59:03 +02:00
Patrick Nicolas 8d6245330a Add support for VK_KHR_unified_image_layouts 2026-05-19 06:59:03 +02:00
Jonathan Steffan e79621d377 Fix vulkan encode QFOT layouts (NVIDIA green frame)
Compositor release left layouts as eUndefined while encoder acquire
transitioned to eVideoEncodeSrcKHR (or eTransferSrcOptimal on the NVIDIA
tmp_image path); the spec forbids that layout mismatch for exclusive-mode
QFOT. NVIDIA honoured it by treating encode-queue contents as undefined
(solid green frame).

Encoders now publish target_layout. The compositor's release and the
encoder's acquire both transition eGeneral -> target_layout in a single
barrier; per VkImageMemoryBarrier2 the layout transition is performed
exactly once between the queues, so no second non-QFOT barrier is needed.
target_layout is eVideoEncodeSrcKHR on the direct vulkan encode path and
eGeneral elsewhere.

Also fix optimal_transfer(): the inner `auto to = ...` shadowed the
parameter, so the maintenance9 check was effectively always false.
2026-05-19 06:59:03 +02:00
Patrick Nicolas 27b92bba1c Skip pressure vessel var if home is in /var 2026-05-18 17:21:38 +02:00
galister 86c19fc5cc fix convergence_angle 2026-05-10 17:21:43 +02:00
Patrick Nicolas 54b96430f6 Addjust some IDR handler logs 2026-05-10 11:35:50 +02:00
Patrick Nicolas e3be6294c8 Configurable headset margin time 2026-05-08 16:23:35 +02:00
Patrick Nicolas b5226f0480 Remove app pacer from debug GUI on destruction 2026-05-08 16:23:35 +02:00
Patrick Nicolas 1420c167fe Add back COMP_TARGET_TIMING_POINT_SUBMIT_END 2026-05-05 15:19:33 +02:00
Patrick Nicolas 7e81f23f0f Add missing includes 2026-05-02 20:39:37 +02:00
Patrick Nicolas 077a6552ef Replace vk::RemainingArrayLayers with values 2026-05-02 14:11:53 +02:00