feat(presenter): VAAPI dmabuf → Vulkan zero-copy import + CSC pass (phase 2)

The decoder's NV12 dmabuf imports per-plane (R8 + GR88, explicit DRM
format modifier, dedicated dup'd-fd import, FOREIGN→graphics acquire)
and a fullscreen-triangle render pass converts it into the presenter's
video image with the CICP-driven coefficients ported from video_gl.rs
(same tests, plus a rows-vs-matrix agreement check). SPIR-V is committed
(shaders/build.sh regenerates) so builds and CI need no toolchain. The
import extension set is probed at device creation; unsupported boxes and
3-failure streaks demote the decoder to software via the existing
force_software contract. The session binary now honors the Settings
decoder preference instead of forcing software.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 18:12:16 +02:00
parent 89d45f2a55
commit a02d0a2e9f
12 changed files with 1091 additions and 56 deletions
+9 -4
View File
@@ -3,11 +3,16 @@
//! decoded frames, captures input on the `ui_stream` state-machine contract, and reports
//! the unified stats window on stdout. No UI toolkit anywhere in the dependency tree.
//!
//! Phase 1 is the software path: `CpuFrame` RGBA uploads + a transfer-only letterbox
//! blit (no graphics pipeline, no shaders — those arrive with the Phase 2 dmabuf/CSC
//! pass). A hardware (dmabuf) frame slipping through demotes the decoder to software via
//! the session pump's `force_software` contract, same as the GTK presenter.
//! Two frame paths: software (`CpuFrame` RGBA staging upload) and hardware (the
//! decoder's NV12 dmabuf imported per-plane into Vulkan + the CICP-driven CSC pass —
//! `dmabuf.rs`/`csc.rs`), both composited by a letterboxed blit. Devices without the
//! import extensions, and any import/present failure streak, demote the decoder to
//! software via the session pump's `force_software` contract, same as the GTK presenter.
#[cfg(target_os = "linux")]
pub mod csc;
#[cfg(target_os = "linux")]
pub mod dmabuf;
#[cfg(target_os = "linux")]
pub mod input;
#[cfg(target_os = "linux")]