Add native HDR10/scRGB, flip-model VRR tearing, high-refresh modes, and DPI/resize handling #288
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!288
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-288"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Vladimir-Human on GitHub · 2026-11-27 13:43 UTC · original
Vladimir-Human:feat/native-hdr-vrr→main· +3502 −112 · 9 files · 1 commits · openSummary
Adds three independently switchable native PC display capabilities — all defaulting to
0(off) so SDR / 2-buffer / 60 Hz / baseline windowing stays the untouched control path for isolated A/B comparison:Native HDR10 ST.2084 PQ & scRGB (
VICTORY_HDR=0|auto|hdr10|scrgb, default0= SDR control):IDXGIOutput6::GetDesc1()incrates/victory-gpu/src/display_output.rsfor active HDR state, bit depth, luminance bounds, and primaries, returning accurate HDR capabilities (1+ 12-byte luminance info) or SDR (2) fromcrates/victory-hle/src/modules/display.rs.IDXGISwapChain4for HDR10 PQ (R10G10B10A2_UNORM+G2084_NONE_P2020+SetHDRMetaData(HDR10)) or extended-linear scRGB (R16G16B16A16_FLOAT+G10_NONE_P709) when opted in, skippingSetColorSpace1/SetHDRMetaDataon SDR control.crates/victory-gpu/src/compose.rsso HDR highlights (> 1.0) are preserved uncrushed while compositing sRGB HUD/overlay planes scaled toVICTORY_HDR_PAPER_WHITE_NITS(default200nits, clamped[80, 1000]), with a dedicatedUI_FORMATPSO forPicture::Overlayand paired format/color-space validation (format_matches_color_space,Composer::format(),Composer::record()rejecting format/color-space mismatches withE_INVALIDARG).Flip-Model VRR Tearing, Waitable Latency & High-Refresh Modes (
VICTORY_VRR=0|1, default0= baseline 2-buffer / 60 Hz):VICTORY_VRR=0: preserves baseline 2-buffer swap chain (Flags == 0, no tearing/waitable), single 60 Hz mode incrates/victory-gpu/src/dxgi.rs, andSIXTIETHdefault pacing incrates/victory-gpu/src/frame.rs.VICTORY_VRR=1: enumerates progressive high-refresh host modes (120/144/180/240 Hz), adopts the active host refresh interval, and enables 3-buffer flip-model swap chains withALLOW_TEARING(DXGI_PRESENT_ALLOW_TEARINGwhensync_interval == 0and windowed/borderless) andFRAME_LATENCY_WAITABLE_OBJECT(SetMaximumFrameLatency(1)), with per-option overrides (VICTORY_SWAP_BUFFERS,VICTORY_TEARING,VICTORY_WAITABLE_SWAP,VICTORY_VSYNC).Per-Monitor V2 DPI Awareness & Deferred Resize/Occlusion Handling (
VICTORY_NATIVE_RESIZE=0|1, default0= baseline):ensure_dpi_awareness()),WM_SIZE/WM_DPICHANGED/WM_DISPLAYCHANGEtracking inhost.rsandlifecycle.rs, andDXGI_STATUS_OCCLUDEDPRESENT_TESTprobing behindVICTORY_NATIVE_RESIZE=1.Host::drain_queue()beforeResizeBuffers, and swap-chainbuffer_count/swap_flagspreservation active unconditionally.Independent A/B Comparison Guide
Start from the default SDR baseline (all switches unset or
0), then enable one switch at a time on the same output and scene:VICTORY_HDR=0VICTORY_VRR=0VICTORY_NATIVE_RESIZE=0VICTORY_HDR=hdr10(optionalVICTORY_HDR_PAPER_WHITE_NITS=200)VICTORY_HDR=scrgb(optionalVICTORY_HDR_PAPER_WHITE_NITS=200)VICTORY_VRR=1VICTORY_NATIVE_RESIZE=1Verification
cargo run --locked -p xtask -- policy(314 files ok) andcargo test --locked -p xtask(11/11)cargo clippy -p victory-gpu -p victory-hle --all-targets --locked -- -D warnings(default and--all-features: 0 warnings)VICTORY_D3D12_DEBUG=1,--test-threads=1, 0 D3D12/GBV errors):victory-gpudefault (26/26),--features diagnostics(32/32),VICTORY_VRR=1 VICTORY_NATIVE_RESIZE=1(17/17), GBV (VICTORY_D3D12_GBV=1,16/16)victory-hledefault (21/21) and--features diagnostics(21/21)VICTORY_D3D12_WARP=1,--test-threads=1):--features diagnostics+VICTORY_D3D12_DEBUG=1(32/32), CI parity without debug layer default (18/18) and--features diagnostics(19/19)@TaynanGT on GitHub · 2026-11-27 13:48 UTC · original
@Vladimir-Human HDR tone mapping, VRR and resize each need a separate comparison. Start with SDR as the control, then check HDR10 or scRGB on the same output and scene, including the HUD and highlight detail. Keep the composer and swap-chain format checks paired with the display mode.
f467770f02toe29ec500a1e29ec500a1to01f74b90a7@Vladimir-Human on GitHub · 2026-11-27 14:25 UTC · original
@TaynanGT Updated #288 (
01f74b90, rebased cleanly ontomaine45051af) so HDR, VRR, and native DPI/resize are each independently switchable and default to0(SDR / baseline control), with paired composer and swap-chain format checks:0)VICTORY_HDR0(SDR, skips HDR metadata/color-space changes)hdr10,scrgb, orauto; optionalVICTORY_HDR_PAPER_WHITE_NITS=200for HUD luminanceVICTORY_VRR0(2-buffer swap chain,Flags == 0, 60 Hz mode/pacing)1(3-buffer flip-model,ALLOW_TEARING, waitable latency 1, progressive host refresh modes)VICTORY_NATIVE_RESIZE0(baseline DPI/resize/occlusion behavior)1(Per-Monitor V2 DPI, deferredWM_SIZE/WM_DPICHANGED/WM_DISPLAYCHANGE,DXGI_STATUS_OCCLUDEDPRESENT_TEST)Paired composer / swap-chain format checks and test pointers:
display_output.rs:format_matches_color_space,independent_switches_default_off_and_toggle_without_crosstalk,plan_present_always_pairs_swap_format_with_color_space,swap_chain_tearing_waitable_resize_and_present_on_gpu(covers both baseline 2-buffer SDR control and 3-buffer VRR + HDR10/scRGBResizeBufferspairing).compose.rs:Composer::format()+Composer::record()reject mismatched target RTV format or display color space withE_INVALIDARG(composer_rejects_mismatched_target_format_or_display_color_space), alongside HUD/highlight readbacks (hdr10_pq_preserves_peak_luminance_and_maps_paper_white_ui,hdr_scrgb_preserves_highlights_above_one_and_scales_paper_white_ui).host.rs::present_planes: keepsp.color_spacepaired with the active swap-chain format (format_matches_color_space) and rebuildsp.composerwhenever the swap format changes.@TaynanGT on GitHub · 2026-11-27 14:38 UTC · original
@Vladimir-Human The paired format checks cover the swap-chain and composer mismatch I was looking for. Start with HDR alone on the same display, using the same settled scene. Watch the highlight ramps and HUD brightness. VRR and resize can use their own runs.
01f74b90a7to37dbb899b9View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.