D3D12.X: encode sRGB compositor output for presentation #2763
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2763
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2763"
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?
@CryingLaughing on GitHub · 2026-11-26 10:57 UTC · original
CryingLaughing:fix/present-srgb-output-encoding→main· +208 −83 · 1 files · 3 commits · draftStacked on #2537. The follow-up is
0d380f427797fb91a07512d074a5f6f4e1892674, verified withb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7and the exact #2537 heade8d2258c5af20f108770ad8e0e983e9ecba8581eas its integration base. Part of #2456.With concrete sRGB SRVs, the compositor reads linear values. An ordinary UNORM render target then stores those values directly, making midtones too dark on the SDR swap chain.
What is in it
Tested
cargo test -p xcl --lib --locked -j 4 compositor_blends_ui_plane_over_scene_plane -- --show-output --test-threads=1passed 1/1 on this head using an offscreen RGBA8 target on WARP. The same fixture on the integration base failed at the intended assertion. The transparent pixel was[128, 55, 0, 255]before the fix and matched[188, 128, 0, 255]afterward.cargo build --workspace --locked -j 4passed. The four-thread workspace run stopped in the library harness ata_dispatch_with_a_pipeline_still_building_waits_at_the_submitwith 1,309 passed, 1 failed, and 27 ignored. The compositor regression passed in that run. 25 capability skips were logged before it stopped.cargo test --workspace --locked -j 4 -- --test-threads=1 --show-output, finished with 1,436 passed, 0 failed, and 47 ignored across 37 harnesses. The pass count includes 29 capability skips.Known limitation
[128, 55, 0, 255]with a transparent UNORM UI plane over an sRGB scene. The expected pixel was[188, 128, 0, 255].Not tested
e8d2258c5a' into HEAD 2329a4de28@CryingLaughing on GitHub · 2026-11-26 11:35 UTC · original
I verified a follow-up for the mixed-format case described above. Commit
96b0b189fd0a8991c8e7883823191cf54d896223is based on this exact draft head0d380f427797fb91a07512d074a5f6f4e1892674. It uses the opaque base plane to choose 8-bit SDR output encoding and keeps each input plane’s own SRV format.[128, 55, 0, 255]on the WARP negative control. The follow-up read back[188, 128, 0, 255]on the RTX 4080. Native checks also covered fractional-alpha UI, BGRA, and the reverse mix with a UNORM base and an sRGB UI. All five offscreen checks ran in one focused test, with 1 passed, 0 failed, 0 ignored, 0 capability skips.cargo build --workspace --locked -j 4andcargo test --workspace --locked -j 4 -- --test-threads=4 --show-outputpassed with 1,436 passed, 0 failed, 47 ignored across 37 harnesses, including 29 capability skips in the pass count.RTX 4080 driver 621.01, i5-13600K, Windows 11 25H2 build 26200.9974, Rust 1.100.0 x64 MSVC and DXC 1.8.2502.11. The native test was
hle::d3d12x::present::frame_dump_tests::compositor_blends_ui_plane_over_scene_planewith an adapter-selection and readback-logging overlay. Physical display output and retail smoke remain untested.View 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.