Commit Graph

1 Commits

Author SHA1 Message Date
82943cc672 rdna2spirv: a pixel shader's k-th colour export goes to its k-th declared SV_Target (SHADER-213)
Colour exports are packed: a pixel shader that declares SV_Target0 and
SV_Target2 exports mrt0 and mrt1. The translator decorated exp mrtN with
Location N, so the second value went to render target 1 instead of 2. It
now reads the shader's OSG1 (system value 64, SV_Target n in register n)
and maps export K to the K-th declared target. The index's outputs list
follows, so it names render targets.

- Without an OSG1 (hand-written listings, run_gpu_tests.py fixtures), mrtK
  stays location K.
- An export past the declared targets is Unsupported.

tests/semantic/test_sparse_sv_target.py covers gaps at 2, 3 and 7,
consecutive targets, no signature, and an export past the declared ones.
It runs the [0, 2] case through the interpreter. With the old translator,
3 of its 5 tests fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 04:39:08 +01:00