Skip to content

kyty: descriptor pool stops in PPSA38500 past #314: the MaxSampledImages check, then createDescriptorPool failures with hundreds of persistent pools #340

Backlog

Description

@SleglJan

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.

  1. The sampled-image check.
    • shaders.cpp:237 exits with pipeline 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::Commit already makes a pool sized for a layout that doesn't fit the default pool (LargePoolSizes).
  2. Pool creation, with that term removed (6 runs, ended at 281 to 365 s):
    • 3 runs: createDescriptorPool in CommitPersistent returned ErrorOutOfDeviceMemory. 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: createDescriptorPool in CreateDescriptorPool failed (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.

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, with maxSets = 1, sized to the set's layout. The pool stays in m_persistent_pools until ~DescriptorHeap.
  • It has two callers:
    • AcquireTableRingSet (descriptors.cpp:3195) makes up to MaxRingSets = 6 sets per TableBindingState;
    • the table state's slot_set makes one more (descriptors.cpp:3634).
  • TableBindingStates live in m_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 of 0x05dc60d7ff9e4fce:
    • 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 MaxSampledImages term 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.
  • 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

  1. github-actions commented on Nov 26, 2026

    @github-actions

    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 VkResult at 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions