29 Commits
Author SHA1 Message Date
Patrick Nicolas 879c50c743 Add back unused-variable warning 2026-10-16 08:03:21 +02:00
Patrick Nicolas 333e080d1c Provide Vulkan version to Monado 2026-07-30 19:12:06 +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
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 1fc70945cb Downgrade message for vk queue family indices 2026-06-09 21:07:46 +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 19c5285479 Respect NVIDIA constraints for vulkan encode input
Images can't have mutable flag for vulkan encode on NVIDIA, perform a
copy instead, as they allow transfer dst.
2026-04-12 16:03:05 +02:00
Patrick Nicolas 9c3615dd0b Log GPU and queues on vulkan instance creation 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 6c6519fab5 Use VK_KHR_maintenance9 (drop queue transfer) 2026-04-04 13:40:47 +02:00
Patrick Nicolas b71a1eddf5 Add support for intra-refresh with vulkan video 2026-04-02 15:17:17 +02:00
Patrick Nicolas 22a819b8c8 Implement main compositor
Replace the patches to Monado's main compositor with a local
implementation, reusing code when relevant.

The layer squasher is very close to comp_render_cs, while distortion is
completely replaced by foveation.
2026-03-31 09:06:27 +02:00
Patrick Nicolas aa3a1808f8 really fix crash when vulkan video is not supported 2025-11-01 20:11:21 +01:00
Patrick Nicolas 07bc8c9bac Fix crash when vulkan video is not supported 2025-11-01 09:33:55 +01:00
galister c6e05754c8 update monado 2025-10-07 09:52:57 +02:00
Patrick Nicolas e3356acc16 Update Monado 2025-09-22 23:35:28 +02:00
Patrick Nicolas c15de9bf27 Automatically name image/buffer allocations 2025-08-16 14:15:29 +02:00
Patrick Nicolas 5be3a8aef4 Utility to name vulkan objects 2025-06-12 15:46:37 +02:00
Patrick Nicolas e4e61e2b0a Fix build with vulkan headers 304 2025-01-10 21:51:10 +01:00
Patrick Nicolas 6f434ec4cd Register debug callback 2024-10-27 11:31:29 +01:00
Patrick Nicolas 04260752e9 Experimental h264 vulkan video encode 2024-10-27 11:31:29 +01:00
Patrick Nicolas 28284a9694 wivrn namespace: move all server classes 2024-10-03 23:39:32 +02:00
Patrick Nicolas 685061ca59 Relax pipeline barriers if possible 2024-08-16 21:24:50 +02:00
Patrick Nicolas 959d82ede3 update monado 2024-03-05 17:00:35 +01:00
Patrick Nicolas 6e90a7e594 fix build with Vulkan SDK 1.3.268 2024-02-18 16:15:55 +01:00
Patrick Nicolas e385e459ee Always do yuv conversion in vulkan 2024-02-18 16:15:55 +01:00