Repository navigation
fix(agc): allocate oversized descriptor sets from a dedicated pool - #1266
Merged
adriadam10 merged 1 commit intoOct 8, 2026
Merged
Conversation
9 tasks done
DescriptorCache::Allocate returned no set when a set needed 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 then fell back to a pool of its own, but PrepareDrawBindings has no fallback and threw "draw snapshot descriptor allocation failed", so a recorded draw with such a set and a snapshotted input was skipped. Such a set now gets a pool sized to it (maxSets 1, no FREE_DESCRIPTOR_SET_BIT), which Free destroys. Every set's count of each type is first checked against the device's maxDescriptorSet* limit; other descriptor types throw. The [descriptors] profile line counts the dedicated pools.
This was referenced Oct 7, 2026
|
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.
|
Celegans12
force-pushed
the
fix/agc-oversized-descriptor-sets
branch
from
October 7, 2026 20:42
c707d2c to
14b4edd
Compare
This was referenced Oct 8, 2026
Collaborator
|
Checked on the merge with current The PPSA26344 numbers are the author's and not reproduced here. #1184, #1201 and #1202 touch the same |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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. perf(agc): pipeline queue-0 draw commits behind the packet worker #1201 and perf(agc): pipelined draws on by default #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 fix(agc): record depth surface lookups and fast-prove held surfaces #1199 next to this test's call. fix(agc): keep RADV's descriptor pool overrun inside the pool's pages #1065 pads the chain pools against a RADV overrun in pools withFREE_DESCRIPTOR_SET_BIT; the dedicated pools are linear, which RADV bounds. feat(agc): implement image and sampler tables indexed at runtime offsets #757-feat(agc): implement deferred faults for reads through null SRT pointers #759 and feat(agc): implement image_load through image tables #920 add aDescriptorCache::Layoutparameter and merge cleanly.Tested
mainc5e1018: 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)