Recompiler: VGPR tracking misses non-sequential MIMG address registers #885
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#885
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?
@nova-aryan on GitHub · 2026-11-24 07:27 UTC · original
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.
github-bot referenced this issue2026-11-26 04:59:09 +00:00