Recompiler: track non-sequential image address registers #886
No reviewers
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!886
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-886"
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:28 UTC · original
nova-aryan:contrib/mimg-nsa-register-uses→main· +41 −0 · 2 files · 1 commits · draftMIMG 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
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.
github-bot referenced this pull request2026-11-26 04:59:09 +00:00
@ettehn on GitHub · 2026-11-24 07:40 UTC · original · edited 2026-11-24 07:44 UTC
Verified the relative VGPR path on Windows x64 at
0d88bf8ba7(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 of0d88bf8and 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.@SlopTart on GitHub · 2026-11-24 09:34 UTC · original
Linux / AMD RDNA3 datapoint.
Merged state: head
0d88bf8onto main077ce40, clean merge.Full suite,
cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 707 passed, 11 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows plus this rig's title-textures flake family (see #718). non-sequential image-address tracking green; mirror-upload flake hit.Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.
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
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile,--test-threads=4. My Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
@guinpereira on GitHub · 2026-11-24 11:30 UTC · original
Test report: NVIDIA RTX 5060 Ti (wave32), head
0d88bf8: 719 passed, 0 failed, 41 ignored; both new tests passTested
stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (Windows SDK 10.0.26100.0). Debug build, noXCL_SAMPLE_*.0d88bf8as is (base1ec4c98, not rebased on currentmain), clean tree.cargo build --workspace: ok.cargo test --workspace --no-fail-fast -- --test-threads=4: 719 passed, 0 failed, 41 ignored (lib: 676 passed, 21 ignored).SKIPPED(no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware, the same as onmain.image_nsa_address_registers_are_not_a_contiguous_rangeandimage_sequential_address_registers_keep_the_operand_rangepass. They are CPU-only decoder tests, so the GPU does not matter for them.Not tested
scripts/smoke.ps1(no title on this machine).main.AI use: Claude Code (Claude Opus 5.5) ran the commands above and wrote this report. No code changes.
@MiguelMachado-dev on GitHub · 2026-11-24 20:54 UTC · original
#1797 also fixes #885, so it overlaps this PR. It changes the same part of
rdna2::vgpr_uses, and the two conflict textually.The difference is that #1797 counts an image instruction's registers exactly instead of conservatively:
recomp::emitanddxil::lower_imageread them. With NSA, VADDR is followed by only that many NSA bytes, so padding bytes are not counted.dxil::lower_imagenow readsVDATA + 1for a compare-swap only.The tests in #1797:
On an RTX 5080, the suite gives 893 passed, 0 failed, 42 ignored, against 891 / 0 / 42 on
main4178e88. The smoke runs there are still missing.The exact counts matter for the per-lane form in #1745. That form passes only the registers
vgpr_useslists, and refuses an instruction that reads any other.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.)
@Toons29 on GitHub · 2026-11-25 03:06 UTC · original
Regression run of
0d88bf8bon the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 100 % of
main's frames, 100 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; I checked the blocks before posting.@DavidM1911 on GitHub · 2026-11-25 09:52 UTC · original
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.@throny on GitHub · 2026-11-25 15:33 UTC · original
Two contributors checked independently and found that #1797 #2287 solves the same problem (for #885) in a different way: #1607, group D81. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.
This is a hint from the community triage in #1607, not a maintainer decision.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.