60 Commits
Author SHA1 Message Date
galister 76da2e1cb7 client: support XR_META_foveation_eye_tracked (#1123) 2026-10-22 18:52:55 +02:00
Patrick Nicolas 879c50c743 Add back unused-variable warning 2026-10-16 08:03:21 +02:00
Jonathan Steffan b8e24d7677 chore: update monado to be69de9e2, handle new xrt_view_type values 2026-10-15 23:00:44 +02:00
galister 6b48898774 update monado 2026-09-16 23:23:12 +09:00
Patrick Nicolas e604848409 Remove WIVRN_DUMP_TIMINGS 2026-08-17 21:30:57 +02:00
Patrick Nicolas 333e080d1c Provide Vulkan version to Monado 2026-07-30 19:12:06 +02:00
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
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 534b4c23e3 Use shared pose_flags enum in packets 2026-07-10 13:22:13 -05: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
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 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 9313ccbc1d Use multiple vulkan encode queues if possible 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
galister 86c19fc5cc fix convergence_angle 2026-05-10 17:21:43 +02:00
Patrick Nicolas e3be6294c8 Configurable headset margin time 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 077a6552ef Replace vk::RemainingArrayLayers with values 2026-05-02 14:11:53 +02:00
Patrick Nicolas 7722ed45b3 pacer: adjust phase on feedback instead of predict 2026-04-30 16:54:02 +02:00
Patrick Nicolas f1c02d8f68 Fix debug build 2026-04-30 16:04:15 +02:00
Patrick Nicolas e21b1adf1d Send both frame rate and refresh rate in description 2026-04-27 10:26:58 +02:00
Patrick Nicolas 28cffac9bd remove unused sem_value member 2026-04-25 18:55:12 +02:00
Patrick Nicolas 10387b9b00 Separate framerate/refresh rate 2026-04-19 09:14:03 +02:00
Patrick Nicolas 6d072e30cd Simplify some preferred refresh rate logic 2026-04-19 09:14:03 +02:00
Patrick Nicolas 542b38365f Update monado, add chroma key support 2026-04-17 16:42:53 +02:00
Patrick Nicolas cf602beefb Update monado
move view_config from sys_info to callback
2026-04-17 16:42:53 +02:00
Patrick Nicolas 1f6e237f21 Only write alpha if useful 2026-04-11 16:55:02 +02:00
Patrick Nicolas 9bb39c4809 Drop staging buffer for foveation 2026-04-11 16:55:02 +02:00
Patrick Nicolas 6ab58430e2 Mark command pools as transient 2026-04-11 16:55:02 +02:00
Patrick Nicolas d535f38938 Reintroduce renderdoc support 2026-04-11 16:55:02 +02:00
Patrick Nicolas a70caa529e Add compositor timings to debug GUI 2026-04-11 16:55:02 +02:00
Patrick Nicolas ce83e8fb03 Major synchronization rework
unify submit/post_submit encoder entrypoints
encoders must now wait for their command completion
use transfer queues for CPU -> GPU copy
2026-04-11 16:55:02 +02:00
Patrick Nicolas fe414c4450 Remove image layout transitions 2026-04-11 16:55:02 +02:00
Patrick Nicolas 6db5b8aeb3 Fix VmaAllocationCreateInfo usage 2026-04-10 14:39:09 +02:00
Patrick Nicolas a63aba7155 Smarter foveation subsampling 2026-04-10 14:38:51 +02:00
Patrick Nicolas 6c6519fab5 Use VK_KHR_maintenance9 (drop queue transfer) 2026-04-04 13:40:47 +02:00
Patrick Nicolas 2ede05dafb Remove broken quads back face culling 2026-04-04 09:56:17 +02:00
Patrick Nicolas 3a6f4d0bdf Fix cylinder crop aspect ratio 2026-04-04 09:56:17 +02:00
caszuu d1cbb730a2 don't send frames before a clock offset is found 2026-04-03 19:50:05 +02:00
Patrick Nicolas 6b58b63a33 Crop FOV in layer squasher 2026-04-03 14:19:54 +02:00
Patrick Nicolas 9d0bbdc357 Bind squasher pipeline only once 2026-04-03 14:19:54 +02:00
Patrick Nicolas 0aaf736b48 Return extent in do_layers() 2026-04-03 14:19:54 +02:00