PRAGMATA (PPSA02530): a shader with four bindless image tables and five direct images exceeds MaxImages 64 ("static bindless image capacity exceeded") #5720
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 xXPBSXx on 2026-10-14T08:01:48Z.
What
With the table T# fixes of #5620 and #5550 applied, PRAGMATA (PPSA02530) gets past
GetImageResource dword 0 is not a valid runtime valueand then stops atThe throw is
ResourceMaterializer.cpp:870:if (images.size() + slots - 1u > ShaderInfo::MaxImages) throw ..., withRuntimeAbi::BindlessTableSlots = 16(RuntimeAbi.hpp:39) andShaderInfo::MaxImages = 64(ShaderInfo.hpp:15). Each image that is loaded from a bindless table is expanded to 16 image slots.A debug print I added locally in front of the throw (not part of any PR) gives, for the shader above:
So the shader has 9 static images, 4 of which are bindless tables. At image index 8 three tables are already expanded (9 + 3 x 15 = 54 image slots); the fourth would need 15 more (54 + 15 = 69 > 64). Four tables of 16 slots plus five direct images need 69 slots; the limit is 64.
Log:
PPSA02530_rR/run_094530.err, line 126 ([diag-cap]) and line 129 (what():), counted with Python.This is a design limit (slots per table,
MaxImages, or sharing slots between tables), not a one-line change, so I am not proposing a fix here.Tested
Windows 10 (19045), MinGW-w64 GCC 15.2, Release, NVIDIA GeForce RTX 4080 SUPER; one run of 300 s requested, the title ended with this throw (script times 09:45:24 to 09:47:44);
run_title.ps1, one game at a time.Tree (local merges, not pushed):
main78f1aea706e93b109da7180bf76718f545ef0e43+ #5457 (1243f067b1ead9d45b5ecda38e1f736eddca8916) + #5620 (98afd6bf2d24a32b01d11be5a303ca6d33f71230) + #5550 (cd1757e03659f4a363e1b73a2d8a3711808e084b; its conflict with #5620 intests/ShaderMemory.cppwas resolved with-X theirs, which does not affect the libraries) + #5189 (b6bc7218fd909faddff6f1d1bf769e03292716fa) + the debug print (local commit16abdff1a).Libraries:
ninja -j 8 libsexit code 0 (09:42:18 to 09:45:05), 128.prx(libSceAgcDriver.prx 09:44:48, libkernel/libc 09:45:04, oldest.prx2026-10-13 09:50, not rebuilt byninja);nid_patcherdated 2026-10-14 08:00:09.Local keycode stub:
libSceConvertKeycode.prxreplaced by a stub built locally by D (sha256 prefixB183C69D999980FC, 83053 bytes), becausemainat that time threw insceConvertKeycodeGetCharacter. (#5366 has since been merged; a run without the stub is in preparation and is not part of this report.)Title executable:
PPSA02530_rR/app.exe, a hardlink of D'sPPSA02530_rO/app.exe(dated 2026-10-14 07:36:44); relinker commit and relink command for it: not recorded in my notes.Not tested: Linux, other GPUs, a second run, a different count of tables, a picture of the title.
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-14T10:26:30Z.
Onimusha: Way of the Sword (PPSA27836 01.000.001, also RE Engine) reaches the same throw on Windows 11, RTX 5070, with
main0b97f8b9fplus #5620 and #5550 (and the start-up fixes in #5769):#1184 (tables up to the device's sampled-image limit) targets this limit but needs a rebase onto current
main; it was not tried here.AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-14T10:36:16Z.
Follow-up from Onimusha (PPSA27836), as data for the table redesign mentioned in #1184. As a local experiment only, raising
ShaderInfo::MaxImagesandRuntimeAbi::SampledHeapCapacityfrom 64 to 128 gets it past this throw and pastshader image heap capacity exceeded. It then stops at a compute program that reads a whole table with no material records:So this title needs tables far larger than 16 slots, like the 65536-entry heap of GTA V in #1184. Not proposing the 128 change.
AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by nikowolf123 on 2026-10-14T17:13:08Z.
#757 and #758 are both merged now (15:48 and 15:53 UTC,
maine34c47921), and the throw in this issue is no longer onmain. Before anyone ports #5620/#5820 or starts the #1184 redesign, a PRAGMATA and an Onimusha run onmainwould show what is still missing.What changed on
main.git grepundercore/one34c47921finds noresolveTableImage,IndirectImage,TryMakeTableImage,static bindless image capacity exceeded,bindless image table has ... limit,distinct keys exceedorbindless storage image tables are unsupported. Just before #757 (a453108cf), the first two throws were at ResourceMaterializer.cpp:879 and :382. A planned table image is now oneinfo.imagesentry that heap placement skips (BindingAllocator.cpp:140). Its records go to the image-table binding, whose sizeImageTableCapacitycaps by the device's descriptor limits, not to 16 heap slots per table. So the 69-slot count in the report above no longer applies if the four tables plan as columns (TryMakeTableColumn); only a run shows whether they do.APS5_TRACE_BINDLESSandAPS5_BINDLESS_MATERIAL_SCANare gone as well; the trace is nowAPS5_TRACE_IMAGE_TABLE=1.Conflicts with
maine34c47921(git merge-tree --write-treeon today's heads, not built):ee9506603ResourceTracker.cpp,ResourceMaterializer.cpp,ControlFlowInfo.hpp,ShaderDiskCache.cpp,tests/ShaderDiskCache.cpp727387252ShaderDiskCache.hppe34c47921: none5f3e66d0b#5620 and #5820 change
IndirectImageandTryMakeTableImage, which #757 deleted (inControlFlowInfo.hppthe conflict is #5620's wholeIndirectImagestruct against nothing), so a rebase alone can't clear them. They need a port toTryMakeTableColumn, or nothing if the columns already plan these shaders. Two hints that they might, neither a title result:verifyUniformTableImagerequires a 48-byte record with the T# at +16 to plan as one column with stride 48 (a synthetic test).Run request. @xXPBSXx (PRAGMATA PPSA02530) and @simonbronk (Onimusha PPSA27836), could you run
maine34c47921with only the start-up fixes you need (#5776 merges cleanly on it; for Onimusha the others in #5769), without #5620, #5820 or the localMaxImages/SampledHeapCapacity128 change, and withAPS5_TRACE_IMAGE_TABLE=1? The "before" is @xXPBSXx's two PRAGMATA runs on84b01f9cd(comment) and @simonbronk's Onimusha first screens on the pre-#757 path (comment). What would settle it:GetImageResource dword 0stop on the 48-byte records comes back[image-table] shader 0x... table Nlines for the shaders that stopped beforeimage table:fault line, and the first new stopWolverine (@mrfelek's count) and SAROS (@JJenkx's run) also hit these removed messages, so a run on
mainwould answer the same question there.@MichonGoddijn231849 @simonbronk: #1184 was parked because tables expanded statically into the sampled heap (comment). #757 replaced that expansion, so the runs above should show whether the redesign offered here is still needed. @Pipodi: both bases of #4475 are in
mainnow, and its two commits apply ontoe34c47921without textual conflicts. cc @Celegans12AI-assisted: written with Claude Code; I checked the live threads of #757, #758, #5620, #5820, #4475, #1184, #5769, #5516, #1504 and this issue, and the cited lines at
a453108cfande34c47921. I rangit merge-treeon the fetched heads againste34c47921andgit grepona453108cfande34c47921. No build and no title run.Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-14T19:12:01Z.
@nikowolf123 an Onimusha (PPSA27836) run on current
main, as you asked.Setup: Windows 11 Pro 26200, RTX 5070,
mained835aa76with the other PRs the title needs (#5769), but without #5620 or #5820, and withMaxImagesunchanged.Across six runs of 9 to 20 minutes (about 16,000 shaders compiled), there were no bindless-table,
static bindless image capacity exceededor material-key errors. Before #757/#758, the title stopped on those at its first presentation. So #757/#758 cover what #5620 and #5820 did for this title. I'm closing #5820 as superseded.The title now stops in other places: a
guest snapshot differs from registered memoryrace (#5484 handles it), and a black screen after that, which I'm following on #5769.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T21:39:02Z.
#757 and #758 are merged, so bindless tables are now indexed at their runtime offsets instead of counting against
MaxImages. On Onimusha the samestatic bindless image capacity exceededstop no longer comes up on main (see above). Closing; please reopen if PRAGMATA still stops on it on current main.