Repository navigation
Conversation
An R10G10B10A2 chain is HDR10 (PQ, BT.2020) and an RGBA16F chain is scRGB. An output that cannot present that space keeps the default. Resizing back to an SDR format restores gamma 2.2 / BT.709. Assisted-by: Grok Build (Grok 4.7)
|
Test run of Tested
Review: This addresses the two things I raised on #238 (open, same item of #103): a resize back to an SDR format now restores G22 / P709, and Not tested: no retail title or regression run (I have no unpacked game), no Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
|
A question about Does the retail title switch its PresentX format between SDR and HDR modes? If it can present 10-bit SDR, the colour space needs to come from what the title asks for, not from the format. The PresentX plane records are 0x48 bytes and #615 reads only up to 0x20, so the title's colour space may be in the rest. Failing that, an AI-assisted (Claude Code), read-only review. |
|
Regression runs for this PR's head main: this PR: Tested
Not tested
Report written with Claude Code (Claude Opus 5.5) from runs on this machine. |
|
Code read of
AI use: Claude Code, Claude Sonnet 5.5, read the code at the head above and drafted this; a person checked it before posting. |
|
Additional DXGI output-path validation on a hybrid NVIDIA/Intel laptop: Hardware:
A temporary DXGI diagnostic found:
No SetColorSpace1 call was made by this probe, so this is not evidence of successful HDR10 or scRGB presentation, nor proof that SetColorSpace1 would fail for PQ. This provides an additional hybrid-rendering/output-path datapoint for evaluating the output-specific color-space handling in this PR. It does not resolve the separate question of whether R10G10B10A2 content is actually HDR10 or 10-bit SDR; that distinction still needs to come from title intent or another reliable signal. The temporary diagnostic was removed after the run. No XCL source files were modified. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Part of #103. An HDR swap chain was created as
R10G10B10A2_UNORMorR16G16B16A16_FLOATand left on DXGI's default colour space, so HDR10 is shown as gamma 2.2 / BT.709. The chain now callsSetColorSpace1: PQ / BT.2020 forR10G10B10A2, scRGB forRGBA16F. An output that cannot present that space keeps the default, and a resize back to an SDR format restores gamma 2.2 / BT.709.This is item 3 of #103 only. The multi-plane, frame-clock, and QPC-flag items are unchanged. ivall already fixed the presenter queue pin and the interval tolerance on main.
What is in it
crates/xcl/src/hle/d3d12x/present.rs:apply_hdr_color_spaceruns when the swap chain is created in an HDR format, and again afterResizeBufferswhen the format was or becomes HDR. Two tests cover the format map and a real swap chain on this output.Tested
hdr colour space support: HDR10 0x1 (set true), scRGB 0x1 (set true). That run was one log-line dash short of the committed text. The call and the asserts are the same.cargo test --workspace --offline -- --test-threads=1on the committed tree (parent6025201, then rebased ontod208e14, which only updatesREADME.mdand does not touch this code): 706 passed, 0 failed, 41 ignored, exit 0, 108.56s. Lib: 665 passed, 21 ignored, 61.49s. Package lines: 665/21, 0, 13, 3/4, 1, 3, 2, 7, 0/4, 1, 1, 2, 1, 1, 6/12, 0, 0.gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware.XCL_SAMPLE_*were unset; those tests are part of the 41 ignored.cargo build --release -p xcl --offlinesucceeded for maind208e14and for this head1430c16. The only warning is the pre-existingfetch_updatedeprecation inxgameruntime.Regression run
No retail title on this machine, and no HDR display check. Both runs are the in-tree test title with
--hello, for 20 seconds, each with its ownXCL_DATA_ROOT.scripts/smoke.ps1on main cannot pass title arguments, so these runs used a local-TitleArgsthat is not in this commit. A stocksmoke.ps1without--hellomakes the title exit 0x1, and that counts ascrashes: 1. Both logs sayprocess ends ((exit 0), at 1.953s on main and 1.927s on this head, which is before the 2s activity line, so presents and peak commit are empty. The earlyrust_panicis the title's expected caught C++ exception. The test title's swap chain is SDR, so this run does not exerciseSetColorSpace1.Not tested
scripts/test.ps1(--test-threads=4). On this machine that script fails inplaced_title_textures_share_vram_and_preserve_pixelson unmodified main (the Tests: placed_title_textures_share_vram_and_preserve_pixels fails now and then at its cubemap reuse check (main 9ce2070) #718 cubemap flake, then twoPoisonErrors). The serial run above is the result for this commit.AI use
Grok Build (Grok 4.7) wrote the colour-space call and its tests, ran the suite and both smoke runs, and opened this pull request.