fix(shader): support 32 logical samplers in runtime heap #6699
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6699"
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 MarcZX10 on 2026-10-16T05:11:25Z.
What
Closes #6692. Carries Tamalero's existing commit unchanged, preserving the original commit author and co-author metadata. The runtime sampler heap can currently hold 16 logical samplers because each uses two descriptor entries. This change raises it to 32, updates the runtime ABI version so old cached shaders are rebuilt, and reports the sampler count when allocation exceeds capacity.
The change adds profile coverage for 20 and 32 logical samplers. The issue reports that the new game reaches gameplay with this capacity change; I did not run the title locally.
Tested
python3 tools/check_conventions.py --base upstream/mainpassed.agc_shader_device_profile_testsdid not complete with GCC 12: compilation stopped in unchangedSrtDescriptorEvaluation.cppatFlags<MemoryFlags>()parsing. The changedBindingAllocator.cppcompiled before that failure, but I could not execute the focused CTest here.Checklist
main; no open PR implements this capacity changeImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T05:32:31Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceAgcDriver/tests/ShaderDeviceProfile.cppcore/shader/recompiler/Optimization/src/BindingAllocator.cppImported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-16T05:45:18Z.
A correction to the testing notes: the focused profile test and the LEGO Batman run were built with GCC 16.2.1 (20260810), not GCC 15. It was a Linux Release build with
BUILD_TESTING=ON. I haven't tried GCC 12, so I can't say anything about theSrtDescriptorEvaluation.cppstop.One more detail, already in #6692: the gameplay run used a local build with the same capacity and layout change, but without the version bump and the new test. The suite results are from commit
4a53994d6itself.Tested and written by Claude (AI assistant) on a contributor's machine.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T15:34:52Z.
Thanks for correcting the GCC version and clarifying the gameplay build composition. I updated the PR description to report GCC 16.2.1 and to distinguish the reported gameplay run from validation of this PR’s ABI-version bump and regression test.
Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-16T18:14:57Z.
I built and ran it here (Linux, GCC 16.2.1, PR merged onto
maind9b696ddb).agc_shader_device_profile_testspasses with the PR and fails withmain'sBindingAllocator.cppandRuntimeAbi.hpp(shader sampler pairs exceed runtime heap capacity), so the new 20 and 32 sampler cases are red without the change.ShaderDatagrows from 14,528 to 16,064 bytes, so I checked the draw path on Astro's Playroom (PPSA01325, RTX 5080, NVIDIA 615.78.08), same scene, upstream trace, one run each:main93e54ceddThe pictures match and no new errors appeared. I don't have LEGO Batman, so the gameplay claim is untested here.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T18:43:33Z.
Thanks for the independent Linux validation and the Astro’s Playroom comparison. The regression test’s red/green control confirms the 20- and 32-sampler cases exercise the capacity fix, and the title run adds useful evidence that the larger
ShaderDatalayout did not change the observed rendering or materially affect this trace. I’ll keep the LEGO Batman result attributed to the earlier GCC 16.2.1 build and note that this run did not cover that title.Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-16T23:04:25Z.
Title run on this PR's exact change, as asked above: with
4a53994d6(ABI version 13 and the test included), LEGO Batman: Legacy of the Dark Knight (PPSA16833 v01.010.000) gets past the New Game stop from #6692.Tree:
main5d9dcc42d+ this commit (cherry-picked, patch-identical) + #6694's commit (also patch-identical) + thesceWebBrowserDialogOpenForPredeterminedContenthunk from #6447 for the Terms of Service screen, plus two input-only changes (#6569 and theMouseInput.cppchange of #6153). Fresh, empty shader cache, since the version bump changes the cache keys.shader sampler pairs exceed runtime heap capacityin any of today's 3 logs.Details
Linux (CachyOS), RTX 4090, i9-14900K, GCC 16.2.1, Release. Relinked with
--to-intelby the relinker at5d9dcc42d. Two of the three runs stopped later for reasons outside this PR: one at "guest allocation … is still pinned by GPU work or an import" in the opening cutscene while the cold cache was compiling (about 25 s per frame), one at start-up on the storage-image write-back throw (the #6301 message), which didn't repeat. The run that reached gameplay usedAPS5_PIN_WAIT_MS=180000; I can't tell whether that or the warmer cache got it past the cutscene.Tested and written by Claude (AI assistant) on a contributor's machine.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T23:16:38Z.
Thanks for running the title on the exact published change, including ABI version 13 and the regression test. This closes the gap between the earlier capacity-only gameplay run and the current PR head: the title gets through New Game and into the opening area in the reported runs, with no sampler-capacity error. I have updated the PR description to distinguish this current-head result from the earlier run and to keep the later unrelated stops scoped to the supplied logs.