Translate a two-texture gfx1013 pixel shader and verify the blend on D3D12 #99

Merged
descent81 merged 5 commits from upstream-pr/100 into main 2026-11-21 16:38:43 +00:00
descent81 commented 2026-11-21 15:58:05 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by descent81 on 2026-11-21T15:58:05Z.


Extend the straight-line gfx1013 pixel translator with an explicit second texture descriptor offset mapped to t1. The original fixture samples two textures with one point sampler and combines a horizontal red ramp (75%) with a vertical blue ramp (25%).

The LLVM binary test assembles the fixture, extracts its native instructions from a synthetic container, disassembles them, and checks that lowering produces the same HLSL used by the rendering test.

Local end-to-end verification used LLVM 15.0.7 to assemble 31 instructions (192 bytes). DXC compiled the HLSL produced from the disassembled bytes. On both WARP and an NVIDIA GeForce RTX 4060 (driver 32.0.16.1088), all 16,384 RGBA channels across 4,096 pixels matched the independent CPU reference exactly. Both rejected swapped texture bindings. D3D12 reported zero debug errors and warnings. Both readbacks had SHA-256 4ecb2ea56e21fde443a2d466c0a3c97ec0478e283a3d62f57d316386678d8f38.

The existing single-texture and BC7 rendering tests also passed on both backends. All dual-texture inputs are original synthetic shaders; compatibility with game shaders remains untested.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6531068490 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/100). Originally posted by [descent81](https://github.com/descent81) on 2026-11-21T15:58:05Z. --- Extend the straight-line gfx1013 pixel translator with an explicit second texture descriptor offset mapped to t1. The original fixture samples two textures with one point sampler and combines a horizontal red ramp (75%) with a vertical blue ramp (25%). The LLVM binary test assembles the fixture, extracts its native instructions from a synthetic container, disassembles them, and checks that lowering produces the same HLSL used by the rendering test. Local end-to-end verification used LLVM 15.0.7 to assemble 31 instructions (192 bytes). DXC compiled the HLSL produced from the disassembled bytes. On both WARP and an NVIDIA GeForce RTX 4060 (driver 32.0.16.1088), all 16,384 RGBA channels across 4,096 pixels matched the independent CPU reference exactly. Both rejected swapped texture bindings. D3D12 reported zero debug errors and warnings. Both readbacks had SHA-256 `4ecb2ea56e21fde443a2d466c0a3c97ec0478e283a3d62f57d316386678d8f38`. The existing single-texture and BC7 rendering tests also passed on both backends. All dual-texture inputs are original synthetic shaders; compatibility with game shaders remains untested.
upstream-sync closed this pull request 2026-11-24 06:41:19 +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!99
No description provided.