Repository navigation
Description
What happens
With the #314 shader skipped, PPSA38500 01.002.001 stops on a descriptor-pool check. With that term removed, it stops later in descriptor pool creation.
- The sampled-image check.
shaders.cpp:237exits withpipeline needs 262160 sampled images (262160 in one stage); the device allows 8388606 per set and 8388606 per stage, a descriptor pool holds 262144.- It did so in 8 of 10 runs; the other 2 hung the GPU first, at 194 and 243 s. The pipelines needed 262,160 to 266,284 sampled images.
- The runs ended 76 to 80 s after the start, or 410 s in the one with
RADV_DEBUG=hang. - The term that fails is
sampled_images > DescriptorHeap::MaxSampledImages(line 233), which is the default pool's size.DescriptorHeap::Commitalready makes a pool sized for a layout that doesn't fit the default pool (LargePoolSizes).
- Pool creation, with that term removed (6 runs, ended at 281 to 365 s):
- 3 runs:
createDescriptorPoolinCommitPersistentreturnedErrorOutOfDeviceMemory. That came after 305, 316 and 351 persistent pools, which held 53.8 M, 56.4 M and 60.4 M sampled-image descriptors. - 1 run:
createDescriptorPoolinCreateDescriptorPoolfailed (result not logged). It had at least 256 persistent pools, holding at least 42.2 M. - 1 run: it ended on
invalid image view: image_format=145 view_format=97(BC7_UNORM viewed as R16G16B16A16_SFLOAT), with at least 320 persistent pools. - 1 run: it hung the GPU, with at least 704 persistent pools.
- In the 4 runs with a pool failure, device VRAM use (
mem_info_vram_used) crossed 15.5 GiB at 48 to 55 s and stayed above it to the end, peaking at 15.91 of 15.92 GiB. I haven't measured how much of it the pools take.
- 3 runs:
Doubling MaxSampledImages instead of removing the term (which also doubles the default pool) gave the same kind of stop: CommitPersistent's createDescriptorPool failed at 399 s (result not logged), in a run with RADV_DEBUG=hang.
Why the pool count grows
On 1a2f6553dc (these files are unchanged since 90a48455d2):
CommitPersistent(descriptorHeap.cpp:129) makes one pool per set, withmaxSets = 1, sized to the set's layout. The pool stays inm_persistent_poolsuntil~DescriptorHeap.- It has two callers:
AcquireTableRingSet(descriptors.cpp:3195) makes up toMaxRingSets= 6 sets perTableBindingState;- the table state's
slot_setmakes one more (descriptors.cpp:3634).
TableBindingStates live inm_table_states, keyed by the program (descriptors.cpp:2293,render.h:622). Nothing erases them.
So every program that binds a bindless table keeps up to 7 persistent sets, each in its own pool, for the whole session. The printed layouts had about 32 K to 262 K sampled images each.
Related, but a different limit: #311, the image heap's resident images on the same title (landed as dcdde0a389).
Title, builds, system
- PPSA38500 01.002.001, saved profile past the first-boot screens, warm caches. Input: none in 2 runs, by hand in 1, a script pressing Cross every 4 s in the others.
- Local builds on AnyKyty
90a48455d2, all with a local switch that drops the dispatches of0x05dc60d7ff9e4fce:- item 1: the switch alone (2 runs, 1 of them with
RADV_DEBUG=hang), or with a second switch that adds a full memory barrier after each compute dispatch (8 runs, half with it on). The stops came in both arms. - item 2: the same, with the
MaxSampledImagesterm removed and the persistent pools counted. The[kyty-pools]lines print at powers of two and every 64 pools, so counts not taken at a failure are lower bounds. - the doubling:
MaxSampledImages= 524288, no counter.
- item 1: the switch alone (2 runs, 1 of them with
- Linux, RX 9070 XT (16 GB), RADV GFX1201, Mesa 26.2.6. The title's host RAM peaked at 30 to 38 GiB in the 6 runs of item 2.
Not tried
Any change to how persistent pools are made or released.
AI-assisted: yes (Claude Code)
Activity
github-actions commentedon Nov 26, 2026
Thanks for separating the default-pool size check from the later allocation failure. I’d keep those in separate PRs: first verify that a layout above the default capacity but within the applicable Vulkan limits can use the oversized-pool path without increasing the default. Check the persistent path too, since it allocates separately.
For the follow-up, could you take one failing run and log the exact
VkResultat both pool creation sites, along with the allocation flags and descriptor counts for the failed request? The retained pool count is useful, but total VRAM usage alone doesn’t show how much memory the pools account for. Any reclamation change will also need to verify that sets aren’t recycled while submitted GPU work can still reference them.