c7ef0e411a
HDR (display-driven, matching the WGC path): - CTA-861.3 HDR EDID (BT.2020 primaries + HDR Static Metadata block) so Windows offers "Use HDR" on the virtual display. The host FOLLOWS the display's live advanced-color state, recreating the shared ring at the matching format (FP16 in HDR / BGRA in SDR) on a toggle — no freeze. - Always emit Main10/BT.2020-PQ Rgb10a2 while the display is HDR; the client auto-detects PQ from the HEVC VUI (clients under-report VIDEO_CAP_10BIT). Generic HDR10 mastering SEI on every IDR. - Generation-tagged `latest` (gen<<40|seq<<8|slot) + driver `is_stale` re-attach kill the toggle-time garbage frame and any stale-ring read. Perf: - Pipeline the encode loop (Capturer::pipeline_depth; IDD-push = 2): submit N+1 before polling N so the convert/copy on the 3D engine overlaps the NVENC encode of N on the ASIC. PUNKTFUNK_IDD_DEPTH overrides (1 = synchronous). - Rotating host output ring (OUT_RING) so the in-flight encode and the next convert never touch the same texture. - HDR converts directly from the keyed-mutex slot's SRV into the output ring (drops the redundant slot->fp16 scratch copy); SDR copies the BGRA slot in. The slot mutex is held only across the convert/copy, not the encode. RING_LEN 3->6 for publish headroom. - Capture-health diagnostic: new_fps vs repeat_fps under PUNKTFUNK_PERF (a low new_fps at a high send rate means the source isn't compositing, not an encode stall). Validated live on the RTX box: 5120x1440@240 HDR streams; driver composes ~180 new fps, encode 240 fps @ ~4.3 ms p50. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
35 lines
1.1 KiB
Rust
35 lines
1.1 KiB
Rust
//! pf-vdisplay — punktfunk Windows virtual display (IddCx), in Rust.
|
|
//!
|
|
//! P1: a UMDF2 IddCx virtual display. Adapted from MolotovCherry/virtual-display-rs (MIT) — its
|
|
//! named-pipe IPC + serde mode config is replaced by an in-tree `monitor` model (and, next, the
|
|
//! SudoVDA-compatible IOCTL control plane our host already speaks). Logging goes to
|
|
//! `OutputDebugString` (no `log`-eventlog/`tokio`). See `docs/windows-virtual-display-rust-port.md`.
|
|
#![allow(non_snake_case)]
|
|
|
|
mod callbacks;
|
|
mod context;
|
|
mod control;
|
|
mod direct_3d_device;
|
|
mod edid;
|
|
mod entry;
|
|
mod frame_transport;
|
|
mod helpers;
|
|
mod logger;
|
|
mod monitor;
|
|
mod panic;
|
|
mod swap_chain_processor;
|
|
|
|
use wdf_umdf_sys::{NTSTATUS, PUNICODE_STRING, PVOID};
|
|
|
|
// The framework entry point. UMDF's reflector calls this; the `+whole-archive` stub forwards to the
|
|
// `DriverEntry` symbol exported from `entry.rs`.
|
|
#[link(name = "WdfDriverStubUm", kind = "static", modifiers = "+whole-archive")]
|
|
extern "C" {
|
|
pub fn FxDriverEntryUm(
|
|
LoaderInterface: PVOID,
|
|
Context: PVOID,
|
|
DriverObject: PVOID,
|
|
RegistryPath: PUNICODE_STRING,
|
|
) -> NTSTATUS;
|
|
}
|