fix(agc): allocate oversized descriptor sets from a dedicated pool #1266
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1266"
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 Celegans12 on 2026-10-07T20:30:47Z.
What
DescriptorCache::Allocatereturns no set when a set needs more descriptors of one type than a chain pool holds (4,096 storage buffers, 1,024 sampled or storage images, 512 samplers). A build's own set falls back to a pool of its own, butPrepareDrawBindingshas none and throwsdraw snapshot descriptor allocation failed, so the draw is skipped.maxSets1, noFREE_DESCRIPTOR_SET_BIT), whichFreedestroys; the cache destroys any left at teardown. A build's set and each of its draw snapshots get their own.maxDescriptorSetSampledImagesand so on); other types throw. Per-stage limits stay checked whereShaderResourcesplans bindings.[descriptors]profile line counts the dedicated pools.DRAW_INDIRECTwith color target 0x5063bf0000 (over 16,000 sampled images) is skipped on every attempt, 36 times in 2,700 s.DescriptorCache::Allocate, by growing a new chain pool's count to the next power of two, and conflicts in that loop. #1201 and #1202 recycle draw-snapshot sets and fall back tovkFreeDescriptorSets, which a dedicated pool (noFREE_DESCRIPTOR_SET_BIT) must not take; they conflict next todedicated, and #1199 next to this test's call. #1065 pads the chain pools against a RADV overrun in pools withFREE_DESCRIPTOR_SET_BIT; the dedicated pools are linear, which RADV bounds. #757-#759 and #920 add aDescriptorCache::Layoutparameter and merge cleanly.Tested
mainc5e10184: configure-DBUILD_TESTING=ON, full build,--target libs,ctest:ctest --output-on-failure)VK_DRIVER_FILES): 395/395 pass;agc_driver_flat_storeis left out there because it takes several minutes on Windows llvmpipeagc_driver_oversized_descriptor_sets(GPU): two 4,097-buffer sets get a pool each and a dispatch reads through one. Fails onmain.agc_driver_graphics: dedicated pool sizes, flags andFree, chain-sized sets, limit and type checks. Fails onmain.draw snapshot descriptor allocation failedskips (409 without it); it made 628 dedicated pools, and theDRAW_INDIRECTinto 0x5063bf0000 bound 16,386 sampled images and was recorded.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)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-07T20:40:03Z.
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/tests/Graphics.cppL1123, L1220, L2473-2474core/libs/prx/libSceAgcDriver/tests/Graphics.cppL1123, L1220, L2473-2474core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL1189core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL1189Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T10:09:56Z.
Checked on the merge with current
main: build + ctest 434/434,agc_driver_graphicsandagc_driver_oversized_descriptor_setspass (the latter ran for real on RADV, not skipped), both fail without the change, CI green on the head, no conflicts. Dedicated pool sizing/flags/Free, the per-set limit check and the unsupported-type throw are pinned by the tests. Merging.The PPSA26344 numbers are the author's and not reproduced here. #1184, #1201 and #1202 touch the same
Allocatecode and will need a rebase on top of this.