Recompiler: VGPR tracking misses non-sequential MIMG address registers #879
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Imported from ivall/xcl. Originally posted by nova-aryan on 2026-11-24T07:27:49Z.
On main
1ec4c98, rdna2::vgpr_uses treats an MIMG VADDR operand as a consecutive register range even when NSA is nonzero. The emitter's mimg path instead uses MIMG_NSA1/2/3 and reads VADDRA, VADDRB, etc. from the extension words.A synthetic IMAGE_SAMPLE with VADDR=v4 and extension address v100 is therefore reported as reading v4/v5/v6, omitting v100. translate uses vgpr_uses to compute max_vgpr, which bounds the switches generated for relative VGPR moves and swaps.
Plan: use the existing NSA encoding fields to conservatively include every encoded address register. Keep sequential behavior for NSA=0 and leave data-register tracking unchanged. Include regressions for all three extension lengths and a sequential control. Encoded padding slots will conservatively count as reads; deriving an exact address count from every image opcode/DIM/A16 combination is outside this fix.
A standalone harness importing the real decoder/spec modules under WSL Rust 1.100.0 reproduces one failed NSA test and one passing sequential control. Windows workspace, GPU and retail smoke validation are pending.
AI use: Codex with GPT-6.1-sol investigated the issue and wrote the proposed tests and fix.
upstream-sync referenced this issue2026-11-24 13:02:56 +00:00