Repository navigation
Recompiler: track non-sequential image address registers - #886
nova-aryan wants to merge 1 commit into
Conversation
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.
|
Verified the relative VGPR path on Windows x64 at 0d88bf8 (RTX 5070 Ti Laptop, driver 621.24, Windows SDK DXC 1.8.2502.11). I adapted gpu_image_sample_offset locally: set M0 to 32, used V_MOVRELD_B32 with base v16 to write the Y coordinate into v48, then sampled the 4脳4 texture with IMAGE_SAMPLE_LZ_O and NSA1 extension bytes [1, 48, 0, 0]. The resulting two-component texels matched on all 64 lanes after DXC compilation and GPU dispatch. Disabling only the new MIMG register-tracking branch made lane 8 read [1, 0] instead of [1, 1]. Unmodified PR head: cargo build --workspace passed. The four-thread workspace run stopped in the library (673 passed, 3 failed, 21 ignored). The first assertion was cubemap extra_pages reuse in placed_title_textures_share_vram_and_preserve_pixels; transitions_apply_when_their_list_is_submitted and d32s8_targets_take_their_own_size_of_video_memory then reported PoisonError. The full one-thread rerun on the same head passed (717 passed, 0 failed, 41 ignored). Two native-wave64 checks reported SKIPPED inside those counts. Optional samples were unset; no retail smoke run. OpenAI Codex (GPT-6.2 Astra) assisted with verification. Follow-up on the four-thread failure: the page counts fell from 17,170,432 to 2,555,904 bytes, exactly the pair reported in #447. I applied only the test changes from #447 (48e7434) on top of 0d88bf8 and reran the entire workspace twice with four threads. Both runs passed: 717 passed, 0 failed, 41 ignored each. The cubemap reuse check passed both times. These two runs used the combined tree. |
|
Linux / AMD RDNA3 datapoint. Merged state: head Full suite, Not tested: retail titles (none here), Windows, RDNA4. Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting. |
|
Test report: NVIDIA RTX 5060 Ti (wave32), head Tested
Not tested
AI use: Claude Code (Claude Opus 5.5) ran the commands above and wrote this report. No code changes. |
|
#1797 also fixes #885, so it overlaps this PR. It changes the same part of The difference is that #1797 counts an image instruction's registers exactly instead of conservatively:
The tests in #1797:
On an RTX 5080, the suite gives 893 passed, 0 failed, 42 ignored, against 891 / 0 / 42 on The exact counts matter for the per-lane form in #1745. That form passes only the registers Thanks for finding and writing up #885. I'm posting this so the two don't get merged without the other in view. Happy to coordinate on which one goes in. (Written with Claude Code, Claude Opus 5.5, xhigh.) |
|
Regression run of Against the limits in CONTRIBUTING.md: 100 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
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 #885.
What is in it
Tested
Independent test reports
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.