shader: lower uncompressed RGBA8 integer render target exports #2370

Merged
RavenCurseBurg merged 1 commit from upstream-pr/2378 into main 2026-11-25 14:41:45 +00:00
RavenCurseBurg commented 2026-11-25 14:21:28 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T14:21:28Z.


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).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6606636514 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2378). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T14:21:28Z. --- ## 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).
upstream-sync closed this pull request 2026-11-25 15:01:51 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!2370
No description provided.