docs(agc): say that a refused device allocation falls back to host memory before throwing #8419
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8419"
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 thuanquang on 2026-10-20T12:29:53Z.
What
The
AGC buffer allocationsentry indocs/dev/debt/libSceAgcDriver.mdends with "allocation failure still throws when reclaim cannot satisfy the request".BufferPool::AllocateMemorynow tries one more step before it throws: after the pool-trim retry and the texture-cache release,VK_ERROR_OUT_OF_DEVICE_MEMORYwith a host memory type other than the refused one allocates in that host type and returns it (BufferPool.cpp:86-99onmain), beforeCheck(result, details)at line 119. Only device buffers (Resources.cpp:183) and images (BufferPool.cpp:589, throughTakeImageMemory) pass that host type; buffer slab blocks (BufferPool.cpp:268) and host buffers (Resources.cpp:98) do not, so they still throw. The "Host placement after a device-memory refusal" entry, two entries down since #8672 added "Storage-cache pressure and idle device buffers" in between, describes the placement. The clause now reads "allocation failure still throws when reclaim cannot satisfy the request, except for the device buffers and images that the "Host placement after a device-memory refusal" entry places in host memory". @harisibrar1 pointed out in review that the first version read as if every allocation could be placed in host memory.Tested
Docs only; nothing was built or run. Checked on
mainby readingcore/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp:56-116(main02b5a8e55); the callers named above were read onmain865166414. Rebased ontomain11d6efa06cfor the conflict with #8672 (merged) indocs/dev/debt/libSceAgcDriver.md: main's text is kept, and the clause now names the host placement entry instead of "the next entry", which #8672's new entry no longer is; the line numbers above were rechecked on that commit.python tools/check_conventions.py --base origin/mainwith this title and body passes.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-21T06:00:13Z.
Review: COMMENTED
Checked against main:
BufferPool.cpp:86: the host fallback runs only forVK_ERROR_OUT_OF_DEVICE_MEMORYwhen ahostTypewas passed; host OOM andTOO_MANY_OBJECTSstill go toCheck(result, details)as before.hostTypeis passed only for device buffers (Resources.cpp:183) and images (BufferPool.cpp:171, viaRefusedDeviceMemoryFallback). Buffer slab blocks (BufferPool.cpp:266) and host buffers (Resources.cpp:98) callAllocateMemorywithout one, so "throws when neither reclaim nor host placement helps" reads as if every allocation in this entry could be placed in host memory.tools/check_conventions.py --base main --head pr-8419passes.Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-21T11:50:01Z.
@harisibrar1 thanks, agreed. I pushed
0423fcd14: the clause now keeps the old "still throws when reclaim cannot satisfy the request" and adds "except for the device buffers and images that the next entry places in host memory", so slab blocks and host buffers read as throwing, as they do (BufferPool.cpp:266,Resources.cpp:98).Imported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-21T13:41:45Z.
Review: APPROVED
Rechecked 0423fcd14 against main:
Resources.cpp:183) and images (BufferPool.cpp:171) pass a host type toAllocateMemory, while slab blocks (BufferPool.cpp:266) and host buffers (Resources.cpp:98) still throw after the reclaim retry.tools/check_conventions.py --base mainpasses on this head.Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.