shader: lower uncompressed RGBA8 integer render target exports #2378

Manually merged
github merged 1 commit from gh-pr/2378/head into gh-pr/2378/base 2026-11-27 00:46:43 +00:00
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 14:21 UTC · original
RavenCurseBurg:shader/startup-rgba8-integer-rtv → main · +44 −18 · 5 files · 1 commits · merged 2026-11-25 14:41 UTC

Change

Refs #1999 (F) and #2148. Uncompressed pixel exports to R8G8B8A8_UINT and R8G8B8A8_SINT now use a matching integer SV_Target. The desktop output merger performs the final channel conversion. The MRT fixture reads both the integer target and a simultaneous UNORM target, then compiles a deliberately low-byte-only pixel shader and checks its distinct output. The host test covers both signatures and the existing refusal for compressed exports.

Verification

On 48e842fc39dc2738bb540b3e7b9289def611ad42, I ran python -B tests/startup_mrt_check.py <startup_stream_consumer.exe> <backend> <compiler> <dxc.exe> <fxc.exe> for all four combinations of WARP (10.0.26100.9711) and RTX 4060 (32.0.15.9579) with FXC SM 5.1 and DXC SM 6.0. I used the stream consumer built from the measurement fixture, which has the same C++ harness change. All four combinations completed. The input ffffffff ffffff7f 00000080 00000100 gave ffff80ff (UINT), ff807f7f (SINT), and ff7f8000 for the low-byte controls. The second target stayed ff0000ff. The local debug layer was unavailable. The exact commit passed all three focused CTests on Windows Server 2025 WARP with the debug layer enabled, zero skips and all four low-byte controls observed. Both WARP compiler runs also passed when integrated with main at c7f38d05, including #2370. Windows Server WARP log.

Host checks passed with python -B tests/startup_gfx2hlsl_export_mask_check.py, python -B tests/startup_gfx2hlsl_refusals_check.py, python -B tests/docs_links_check.py, python -B tests/bidi_controls_check.py and git diff --check.

Evidence and follow-up

Before enabling the formats, I compared translated shaders against independently compiled typed HLSL on three Windows configurations (local RTX 4060, local WARP, and Server 2025 WARP). All 36 pairs matched across two compilers, both formats and three input vectors. In 24 pairs the result distinguished saturation from truncation. The other 12 checked in-range values. The hosted measurement used the D3D12 debug layer. The fixture extends the existing source-generated, in-tree MRT shader under the repository license. These measurements cover desktop D3D12; native console readback remains open. See docs/startup-runtime.md for the stored bytes. #2370 reduces repeat processing in the same test.

AI assistance: Codex, GPT-6.2 Astra (xhigh).

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 14:21 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2378) `RavenCurseBurg:shader/startup-rgba8-integer-rtv` → `main` · +44 −18 · 5 files · 1 commits · merged 2026-11-25 14:41 UTC ## Change Refs #1999 (F) and #2148. Uncompressed pixel exports to R8G8B8A8_UINT and R8G8B8A8_SINT now use a matching integer SV_Target. The desktop output merger performs the final channel conversion. The MRT fixture reads both the integer target and a simultaneous UNORM target, then compiles a deliberately low-byte-only pixel shader and checks its distinct output. The host test covers both signatures and the existing refusal for compressed exports. ## Verification On `48e842fc39dc2738bb540b3e7b9289def611ad42`, I ran `python -B tests/startup_mrt_check.py <startup_stream_consumer.exe> <backend> <compiler> <dxc.exe> <fxc.exe>` for all four combinations of WARP (10.0.26100.9711) and RTX 4060 (32.0.15.9579) with FXC SM 5.1 and DXC SM 6.0. I used the stream consumer built from the [measurement fixture](https://github.com/RavenCurseBurg/Xbox2Windows/commit/f816ef0bee387e61a7c9ef71b32bea4e77537199), which has the same C++ harness change. All four combinations completed. The input `ffffffff ffffff7f 00000080 00000100` gave `ffff80ff` (UINT), `ff807f7f` (SINT), and `ff7f8000` for the low-byte controls. The second target stayed `ff0000ff`. The local debug layer was unavailable. The exact commit passed all three focused CTests on Windows Server 2025 WARP with the debug layer enabled, zero skips and all four low-byte controls observed. Both WARP compiler runs also passed when integrated with main at c7f38d05, including #2370. [Windows Server WARP log](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45632904728). Host checks passed with `python -B tests/startup_gfx2hlsl_export_mask_check.py`, `python -B tests/startup_gfx2hlsl_refusals_check.py`, `python -B tests/docs_links_check.py`, `python -B tests/bidi_controls_check.py` and `git diff --check`. ## Evidence and follow-up Before enabling the formats, I compared translated shaders against independently compiled typed HLSL on three Windows configurations (local RTX 4060, local WARP, and Server 2025 WARP). All 36 pairs matched across two compilers, both formats and three input vectors. In 24 pairs the result distinguished saturation from truncation. The other 12 checked in-range values. The [hosted measurement](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45630892855) used the D3D12 debug layer. The fixture extends the existing source-generated, in-tree MRT shader under the repository license. These measurements cover desktop D3D12; native console readback remains open. See `docs/startup-runtime.md` for the stored bytes. #2370 reduces repeat processing in the same test. AI assistance: Codex, GPT-6.2 Astra (xhigh).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:46:41 +00:00
github manually merged commit 48e842fc39 into gh-pr/2378/base 2026-11-27 00:46:43 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.