fix(shader): accept buffer resource tuples ending in VCC #5648
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5648"
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 boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-14T03:40:02Z.
What
Accept the MUBUF/MTBUF four-dword resource tuple at s104: s104, s105, VCC_LO and VCC_HI. Three decoder lines admit this exact tuple. Existing translation already reads scalar codes106/107 as raw VCC words; normal SGPR bounds and higher-base refusals are unchanged.
LLVM defines SGPR104_128 as VCCTuple, included in the SReg_128_XNULL buffer resource operand. Raw gfx10/gfx1013 behavior remains unmeasured and is recorded in shader debt. Merged #4996 changes MIMG separately.
Fixes #5630. Sonic Unleashed Recompiled/PPSA99902,01.003.000, needs this in its conditional bring-up #4443. The control stops at:
Tested
Focused source 943d362d2, based on main
43349d4337543eca207772b065f10ab19acc24c9. Windows11 Enterprise26200, WinLibs GCC15.2r7, Release, SPIR-V validation enabled. All five original patches remain range-equivalent; an additional style-only commit removes two trailing blank lines. The earlier tested head is preserved on fork branchcodex/buffer-vcc-tested-before-main433.77ea8f03223bfc5c04afd214b41d48273892a888is unchanged on a14, whose intervening change affects libkernel fcntl only. This historical negative control is not newly repeated on main433. The current rebased candidate is clean and passes the full build/repeated checks above.Matched title comparison uses main1978 plus preserved bring-up prerequisites, not unchanged main or the isolated PR branch:
Only libSceAgcDriver differs in the installed profiles; all other module bytes, converted executable/guest libc and input schedule match. Seven timestamp/checksum-only rebuild outputs retain their control bytes. Both runs exit0xC0000409 without harness timeout; originals/runtime/user data restore exactly, no cleanup errors. Input consumption is not logged. This advances the decoder frontier; no menus, gameplay or performance improvement is claimed. No game assets or captured shaders are included.
Checklist
main; no other open PR implements the same functionsImported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-14T07:15:40Z.
A second title that stops on this: PS5 FSR4 Showcase (PPSA99011, catalog 01.000.010). Windows 11 (26300), Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), WinLibs GCC 15.2.0, Release, relinked with
--windows --trap-sdk-syscall-stubs.The title needs two other open PRs to get this far, so both builds are
maind8888df9b+ #5163 (sceAgcInitversion) + #5477 (COPY_DATA register source), with and without this PR's head b4f916bd3:FSR4_SHOWCASE_CHAPTER index=0, thenwhat(): MUBUF resource descriptor register range overflow2 of 2agc_buffer_resource_vccpasses 3 of 3 (--repeat until-fail:3), and so doagc_driver_pm4andagc_driver_pm4_failureon the same tree.The title's next stop, separate from this PR: in 4 of 5 runs its own fence wait for the FSR4 stage fails after about 4.5 s (
FSR4_SHOWCASE_ERROR fence=-4 stage=fsr4 after_ms=4525, thenFSR4_SHOWCASE_END result=FAIL). It happens with warm shader caches too, so it isn't the compile time. In the other runvkQueueSubmitreturned -4 (device lost) at 14 s.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-14T21:58:43Z.
The FSR4 Showcase result on Linux, to go with the Windows run above.
main4808d9c20(which now has #5163 and #5477) with this PR's head943d362d2merged and nothing else open, Bazzite 44 (GCC 16.2.1, Release), RX 7700 XT on RADV:what(): MUBUF resource descriptor register range overflow.FSR4_SHOWCASE_PIPELINES ms=352.5), reachesFSR4_SHOWCASE_READYandCHAPTER index=0, then stops on its own fence wait,FSR4_SHOWCASE_ERROR fence=-4 stage=fsr4 after_ms=4513.So the next stop @LeandroLP23 saw on RDNA 3.5 under Windows is the same on RDNA 3 under RADV, and it isn't specific to the Windows driver.
Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-15T09:23:42Z.
Windows/NVIDIA check of head
943d362d2on PS5 FSR4 Showcase (PPSA99011, 01.000.010), merged ontomain0afa6a607: clean merge.Windows 11 Pro 26220, Ryzen 7 5700X, RTX 4070 (driver 596.21), WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release. Title relinked with
--windows --trap-sdk-syscall-stubs.relinker,libsand both new test targets pass, no warnings in the changed files.agc_buffer_resource_vccandagc_driver_buffer_resource_vcc(--repeat until-fail:3): 2/2, 3 of 3. The execution test ran on the RTX 4070, not as a skip.RdnaMemoryOpDecoder.cppreset tomain. Both tests fail (MTBUF resource descriptor register range overflow).tools/check_conventions.py --base origin/mainandgit diff --check: pass.Title runs, 60 s each, the first in a fresh folder and the next two in the same folder (warm caches):
maind92a8dad3what(): MUBUF resource descriptor register range overflow, exit 0xC0000409, in 2 of 3. The third stopped earlier onFSR4_SHOWCASE_ERROR fence=-4 stage=fsr4 after_ms=4543.main0afa6a607+ this PRFSR4_SHOWCASE_ERROR fence=-4 stage=fsr4 after_ms=4530..4534,FSR4_SHOWCASE_END result=FAIL, exit 0.RdnaMemoryOpDecoder.cppreset tomainwhat(): MUBUF resource descriptor register range overflow, exit 0xC0000409, 2 of 2On
mainthe throw always followsCompute shader 0x275540000 was not registered; preparing its artifact at dispatch. The title's own fence wait can fail before it gets that far, which is what happened in the onemainrun without the throw. So the clearer evidence is the shader itself. With this PR, all 3 runs prepare0x275540000, go on to0x275560000and only then stop on the fence. Without it, every run that reached0x275540000threw there (4 of 4, including the same-tree control).The next stop is the same
fence=-4 stage=fsr4that @LeandroLP23 (Radeon 860M, Windows) and @YossiYad (RX 7700 XT, RADV) saw. It is about 4.5 s after the chapter starts, with warm pipeline caches too, so it is on NVIDIA as well and separate from this PR.Verdict: confirmed. This PR removes the FSR4 Showcase MUBUF stop on NVIDIA/Windows too.
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T11:50:22Z.
Checked the decoder change, both new tests and the TechnicalDebt line. The merged tree builds;
agc_buffer_resource_vccandagc_driver_buffer_resource_vccpass, and both fail with the decoder change reverted. I also measured the tuple on gfx1035:s[104:107](s104, s105, vcc_lo, vcc_hi) returns bit for bit the same as an ordinarys[8:11]descriptor over 32 lanes, forbuffer_load_dwordandbuffer_load_format_x, three formats and in-bounds/out-of-bounds records. Matches the third-party title runs above; merging once the full Build is green.