Repository navigation
docs(agc): say that a refused device allocation falls back to host memory before throwing - #8419
Conversation
|
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.
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.
|
harisibrar1
left a comment
There was a problem hiding this comment.
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.- A
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. - The next entry, "Host placement after a device-memory refusal", already gives the scope and limits. Suggest pointing to it with the scope, e.g. "...allocation failure throws after the reclaim retry, except that a device-local refusal of a device buffer or image is placed in host memory (next entry)", or dropping the change as redundant.
tools/check_conventions.py --base main --head pr-8419passes.
Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
|
@harisibrar1 thanks, agreed. I pushed |
harisibrar1
left a comment
There was a problem hiding this comment.
Rechecked 0423fcd against main:
- "still throws when reclaim cannot satisfy the request, except for the device buffers and images that the next entry places in host memory" matches the code: only device buffers (
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.
…mory before throwing Co-Authored-By: Claude <noreply@anthropic.com>
…mages Co-Authored-By: Claude <noreply@anthropic.com>
0423fcd to
c687e7e
Compare
|
Checked the new clause against |
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