Skip to content

[upstream #886] Recompiler: track non-sequential image address registers - #191

Closed
ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/886
Closed

ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/886

Conversation

@ufoptg

@ufoptg ufoptg commented Nov 24, 2026

Copy link
Copy Markdown
Owner

MIMG instructions with NSA addresses read VGPRs from extension words. Register-use tracking instead reported a contiguous range starting at VADDR, so it could omit a high address register and underestimate max_vgpr, which bounds relative VGPR move/swap switches. Fixes xcl-dev#885.

What is in it

  • Reuse the existing MIMG_NSA1/2/3 fields to include encoded address registers conservatively.
  • Preserve sequential-address behavior and data-register tracking.
  • Test all three extension lengths, including v255, and an NSA=0 control. Document the register-bound behavior.

Tested

  • Actual decoder/spec source modules imported by a standalone rustc --test harness under WSL Kali Linux, Rust 1.100.0.
  • Before the fix: the NSA regression failed (v100 missing), sequential control passed.
  • After the fix: 11 decoder tests passed, 0 failed, 0 ignored. Includes the existing LLVM corpus test (23,812 entries, 23,405 decoded with matching names and lengths; known RDNA1-only instructions excluded by the existing test).
  • git diff --check passed. Synthetic inputs only.

Independent test reports

  • ettehn's Windows check, RTX 5070 Ti Laptop, driver 621.24, DXC 1.8.2502.11, exact unmodified head. A local synthetic relative-VGPR/image test matched all 64 lanes; disabling this change produced a wrong texel. Build passed. Four-thread workspace run reported 673 passed, 3 failed, 21 ignored, starting with the cubemap reuse flake. A full one-thread rerun reported 717 passed, 0 failed, 41 ignored; two native-wave64 checks were SKIPPED. Two four-thread passes with Tests: check cubemap tile reuse independently of idle page reclamation xcl-dev/xcl#447's test changes used a combined tree, rather than the unmodified head.
  • SlopTart's Linux/Proton check, RX 7900 XT/RADV, head merged onto main 077ce40. Reported 707 passed, 11 failed, 41 ignored; the image-register tests passed. The tester attributes the failures to Wine and existing texture-test flakes. This report supplies neither retail coverage nor a passing full suite.

Regression run
Pending Windows main/head retail smoke runs.

Not tested
Main/head retail smoke runs are still missing. Windows and Linux results above are attributed independent reports. Native wave64 coverage was skipped in the Windows report; AMD RDNA4 and additional titles remain unverified. Local execution is stopped at the user's request.
All encoded NSA address slots, including padding, conservatively count as reads. Exact per-opcode/DIM/A16 address counts remain outside this change. This PR remains a public draft pending the required retail regression runs.
AI use
Codex with GPT-6.1-sol investigated the bug, wrote the code/tests and ran the standalone checks.


Mirror of xcl-dev#886 (auto-synced, do not edit).

MIMG NSA address sources live in extension fields. Counting them as a contiguous VADDR range can underestimate max_vgpr for relative register accesses. Conservatively include all encoded addresses and retain the NSA=0 behavior. Fixes xcl-dev#885.
@ufoptg

ufoptg commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Upstream PR xcl-dev#886 was closed or merged.

@ufoptg ufoptg closed this Nov 25, 2026
@ufoptg
ufoptg deleted the upstream-pr/886 branch November 25, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recompiler: VGPR tracking misses non-sequential MIMG address registers

2 participants