fix(driver): bound transient texture upload copies within one draw or dispatch #1180
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1180"
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 MichonGoddijn231849 on 2026-10-07T16:44:28Z.
What
A texture upload recorded into the open batch keeps its host staging copy and its device tiled and linear copies until the batch completes. The finished batch's objects are destroyed only when the hold ends. So a dispatch that creates a thousand bindless table textures held about three times the textures' bytes in copies, and ran out of device memory.
The copies are now kept through
Recorder::KeepTransient, which counts their bytes while they live. When the live bytes exceedAPS5_UPLOAD_BUDGET_MIB(default 1024), the image lookups of a build settle: the recorded work is submitted and waited for, and the finished batches' objects are destroyed at once. Builds under the budget are unchanged.Tested
Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB, MinGW-w64 GCC 15.2.0.
gta-v/testingbranch (Performance mode, the prologue).ctestpasses. Not run here: the relinker's Python tests (my local Python does not find their helper modules) andguest_gameupdate.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-07T19:37:16Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hppL96-103core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cppL2193-2240core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hppL96-103core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cppL2193-2240Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-08T02:44:22Z.
Closing: #1113 bounds the same upload copies a recorder batch keeps alive, was opened first, and has a test and the out-of-memory line. If it doesn't cover what GTA V hits, please comment on #1113 with what it misses.
Pull request closed