GPU: Rejected draw/dispatch bindings may retain dynamic descriptor slots and amplify heap exhaustion #911

Open
opened 2026-11-24 13:59:21 +00:00 by FunWithFlagsDev · 8 comments
FunWithFlagsDev commented 2026-11-24 13:59:21 +00:00 (Migrated from github.com)
Contributor

Imported from Marvisak/VIctory. Originally posted by FunWithFlagsDev on 2026-11-24T13:59:21Z.


<html>

Problem

On upstream ffe310e, a draw or dispatch requiring multiple fresh descriptor tables can successfully allocate some tables before another allocation fails.

Although State::bind() subsequently rejects the operation, the successful allocations remain in fresh_tables and dynamic until the command list is reset or released.

These reservations are not necessarily permanent waste because subsequent operations may reuse them. However, under descriptor pressure, unrecovered reservations may contribute to further allocation failures and amplify heap exhaustion.

Technical analysis

Affected file: crates/victory-gpu/src/draw.rs.

The current allocation path allows partial reservations to survive an unsuccessful bind.

Synthetic example

Consider an eight-slot dynamic heap with two occupied slots:

  1. A draw requests two fresh tables requiring four and three slots.

  2. The first allocation succeeds.

  3. The second allocation fails.

  4. The draw is rejected, but four newly reserved slots remain occupied.

  5. A subsequent operation requiring six contiguous slots cannot allocate them.

With transactional reservation, the unsuccessful operation would leave the original six free slots available.

This is a synthetic allocator-level example, not a measured in-game workload.

Proposed investigation

Before changing allocator behavior, I developed an opt-in diagnostic patch to quantify:

  • New descriptor reservations.

  • Reservations originating in rejected binds.

  • Reservations subsequently recovered through accepted cache hits.

  • Outstanding unrecovered reservations.

  • Peak unrecovered reservations within a command list recording.

  • Allocation failures occurring while earlier unrecovered reservations exist.

  • Failed allocation size distributions.

The diagnostic patch preserves existing allocation behavior, cache semantics, descriptor lifetimes and bind return values.

Enable it using:

VICTORY_DESCRIPTOR_ADMISSION=1

If unrecovered reservations represent a significant fraction of descriptor demand, transactional reservation could complement existing allocator and reclamation improvements.

CPU-side validation

The reservation-policy model was evaluated across 194,074 exhaustive small-heap scenarios.

Metric | Current model | Transactional model -- | -- | -- Rejected operations retaining new reservations | 86,354 | 0

The diagnostic accounting model was independently validated across:

  • 40,000 completed bind snapshots.

  • 180,093 allocation and cache events.

  • Zero discrepancies against a history-recomputing reference model.

All 12 Python tests across both models passed.

These results establish the modeled behavior and accounting invariants. They do not establish the frequency or performance impact of this mechanism in the title.

Relationship to existing work

This investigation complements:

  • #251 — descriptor allocation across the search cursor.

  • #562 — immutable descriptor table reuse.

  • #688 — reclamation of descriptor slots from completed command lists.

  • #840 — avoiding unnecessary dynamic allocations for aligned CBVs.

  • #887 — descriptor heap capacity pressure.

Unlike those approaches, this investigation specifically measures descriptor reservations originating in unsuccessful binds and their subsequent reuse.

Validation requested

The attached package includes:

  • A diagnostics-only Rust patch targeting ffe310e.

  • Native Rust regression tests.

  • Python accounting tests.

  • Build instructions and counter definitions.

Native Rust compilation, D3D12/WARP testing and hardware measurements remain pending.

The immediate objective is to determine whether this mechanism contributes significantly to descriptor pressure before proposing a production allocator change.

Independent validation and feedback would be appreciated.

AI-assisted development. No proprietary game files or assets were used.

</html>## Problem

On upstream ffe310e, a draw or dispatch requiring multiple fresh descriptor tables can successfully allocate some tables before another allocation fails.

Although State::bind() subsequently rejects the operation, the successful allocations remain in fresh_tables and dynamic until the command list is reset or released.

These reservations are not necessarily permanent waste because subsequent operations may reuse them. However, under descriptor pressure, unrecovered reservations may contribute to further allocation failures and amplify heap exhaustion.

Technical analysis

Affected file: crates/victory-gpu/src/draw.rs.

The current allocation path allows partial reservations to survive an unsuccessful bind.

Synthetic example

Consider an eight-slot dynamic heap with two occupied slots:

  1. A draw requests two fresh tables requiring four and three slots.
  2. The first allocation succeeds.
  3. The second allocation fails.
  4. The draw is rejected, but four newly reserved slots remain occupied.
  5. A subsequent operation requiring six contiguous slots cannot allocate them.

With transactional reservation, the unsuccessful operation would leave the original six free slots available.

This is a synthetic allocator-level example, not a measured in-game workload.

Proposed investigation

Before changing allocator behavior, I developed an opt-in diagnostic patch to quantify:

  • New descriptor reservations.
  • Reservations originating in rejected binds.
  • Reservations subsequently recovered through accepted cache hits.
  • Outstanding unrecovered reservations.
  • Peak unrecovered reservations within a command list recording.
  • Allocation failures occurring while earlier unrecovered reservations exist.
  • Failed allocation size distributions.

The diagnostic patch preserves existing allocation behavior, cache semantics, descriptor lifetimes and bind return values.

Enable it using:

VICTORY_DESCRIPTOR_ADMISSION=1

If unrecovered reservations represent a significant fraction of descriptor demand, transactional reservation could complement existing allocator and reclamation improvements.

CPU-side validation

The reservation-policy model was evaluated across 194,074 exhaustive small-heap scenarios.

Metric Current model Transactional model
Rejected operations retaining new reservations 86,354 0

The diagnostic accounting model was independently validated across:

  • 40,000 completed bind snapshots.
  • 180,093 allocation and cache events.
  • Zero discrepancies against a history-recomputing reference model.

All 12 Python tests across both models passed.

These results establish the modeled behavior and accounting invariants. They do not establish the frequency or performance impact of this mechanism in the title.

Relationship to existing work

This investigation complements:

  • #251 — descriptor allocation across the search cursor.
  • #562 — immutable descriptor table reuse.
  • #688 — reclamation of descriptor slots from completed command lists.
  • #840 — avoiding unnecessary dynamic allocations for aligned CBVs.
  • #887 — descriptor heap capacity pressure.

Unlike those approaches, this investigation specifically measures descriptor reservations originating in unsuccessful binds and their subsequent reuse.

Validation requested

The attached package includes:

  • A diagnostics-only Rust patch targeting ffe310e.
  • Native Rust regression tests.
  • Python accounting tests.
  • Build instructions and counter definitions.

Native Rust compilation, D3D12/WARP testing and hardware measurements remain pending.

The immediate objective is to determine whether this mechanism contributes significantly to descriptor pressure before proposing a production allocator change.

Independent validation and feedback would be appreciated.

AI-assisted development. No proprietary game files or assets were used.

victory_descriptor_admission.zip

<!-- greyfinch-sync:Marvisak/VIctory:issue:6583466718 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/911). Originally posted by [FunWithFlagsDev](https://github.com/FunWithFlagsDev) on 2026-11-24T13:59:21Z. --- <html> <body> <!--StartFragment--><h2><span>Problem</span></h2><p><span>On upstream </span><code><span>ffe310e</span></code><span>, a draw or dispatch requiring multiple fresh descriptor tables can successfully allocate some tables before another allocation fails.</span></p><p><span>Although </span><code><span>State::bind()</span></code><span> subsequently rejects the operation, the successful allocations remain in </span><code><span>fresh_tables</span></code><span> and </span><code><span>dynamic</span></code><span> until the command list is reset or released.</span></p><p><span>These reservations are not necessarily permanent waste because subsequent operations may reuse them. However, under descriptor pressure, unrecovered reservations may contribute to further allocation failures and amplify heap exhaustion.</span></p><h2><span>Technical analysis</span></h2><p><span>Affected file: </span><code><span>crates/victory-gpu/src/draw.rs</span></code><span>.</span></p><ul><li><p><a href="https://github.com/Marvisak/VIctory/blob/ffe310e/crates/victory-gpu/src/draw.rs#L459-L473"><span>State::bind — operation rejection</span></a></p></li><li><p><a href="https://github.com/Marvisak/VIctory/blob/ffe310e/crates/victory-gpu/src/draw.rs#L726-L737"><span>State::tables — descriptor reservation and retention</span></a></p></li></ul><p><span>The current allocation path allows partial reservations to survive an unsuccessful bind.</span></p><h3><span>Synthetic example</span></h3><p><span>Consider an eight-slot dynamic heap with two occupied slots:</span></p><ol start="1"><li><p><span>A draw requests two fresh tables requiring four and three slots.</span></p></li><li><p><span>The first allocation succeeds.</span></p></li><li><p><span>The second allocation fails.</span></p></li><li><p><span>The draw is rejected, but four newly reserved slots remain occupied.</span></p></li><li><p><span>A subsequent operation requiring six contiguous slots cannot allocate them.</span></p></li></ol><p><span>With transactional reservation, the unsuccessful operation would leave the original six free slots available.</span></p><p><span>This is a synthetic allocator-level example, not a measured in-game workload.</span></p><h2><span>Proposed investigation</span></h2><p><span>Before changing allocator behavior, I developed an opt-in diagnostic patch to quantify:</span></p><ul><li><p><span>New descriptor reservations.</span></p></li><li><p><span>Reservations originating in rejected binds.</span></p></li><li><p><span>Reservations subsequently recovered through accepted cache hits.</span></p></li><li><p><span>Outstanding unrecovered reservations.</span></p></li><li><p><span>Peak unrecovered reservations within a command list recording.</span></p></li><li><p><span>Allocation failures occurring while earlier unrecovered reservations exist.</span></p></li><li><p><span>Failed allocation size distributions.</span></p></li></ul><p><span>The diagnostic patch preserves existing allocation behavior, cache semantics, descriptor lifetimes and bind return values.</span></p><p><span>Enable it using:</span></p><p><code><span>VICTORY_DESCRIPTOR_ADMISSION=1</span></code></p><p><span>If unrecovered reservations represent a significant fraction of descriptor demand, transactional reservation could complement existing allocator and reclamation improvements.</span></p><h2><span>CPU-side validation</span></h2><p><span>The reservation-policy model was evaluated across 194,074 exhaustive small-heap scenarios.</span></p> Metric | Current model | Transactional model -- | -- | -- Rejected operations retaining new reservations | 86,354 | 0 <p><span>The diagnostic accounting model was independently validated across:</span></p><ul><li><p><span>40,000 completed bind snapshots.</span></p></li><li><p><span>180,093 allocation and cache events.</span></p></li><li><p><span>Zero discrepancies against a history-recomputing reference model.</span></p></li></ul><p><span>All 12 Python tests across both models passed.</span></p><p><span>These results establish the modeled behavior and accounting invariants. They do not establish the frequency or performance impact of this mechanism in the title.</span></p><h2><span>Relationship to existing work</span></h2><p><span>This investigation complements:</span></p><ul><li><p><span>#251 — descriptor allocation across the search cursor.</span></p></li><li><p><span>#562 — immutable descriptor table reuse.</span></p></li><li><p><span>#688 — reclamation of descriptor slots from completed command lists.</span></p></li><li><p><span>#840 — avoiding unnecessary dynamic allocations for aligned CBVs.</span></p></li><li><p><span>#887 — descriptor heap capacity pressure.</span></p></li></ul><p><span>Unlike those approaches, this investigation specifically measures descriptor reservations originating in unsuccessful binds and their subsequent reuse.</span></p><h2><span>Validation requested</span></h2><p><span>The attached package includes:</span></p><ul><li><p><span>A diagnostics-only Rust patch targeting </span><code><span>ffe310e</span></code><span>.</span></p></li><li><p><span>Native Rust regression tests.</span></p></li><li><p><span>Python accounting tests.</span></p></li><li><p><span>Build instructions and counter definitions.</span></p></li></ul><p><span>Native Rust compilation, D3D12/WARP testing and hardware measurements remain pending.</span></p><p><span>The immediate objective is to determine whether this mechanism contributes significantly to descriptor pressure before proposing a production allocator change.</span></p><p><span>Independent validation and feedback would be appreciated.</span></p><p><span>AI-assisted development. No proprietary game files or assets were used.</span></p><!--EndFragment--> </body> </html>## Problem On upstream `ffe310e`, a draw or dispatch requiring multiple fresh descriptor tables can successfully allocate some tables before another allocation fails. Although `State::bind()` subsequently rejects the operation, the successful allocations remain in `fresh_tables` and `dynamic` until the command list is reset or released. These reservations are not necessarily permanent waste because subsequent operations may reuse them. However, under descriptor pressure, unrecovered reservations may contribute to further allocation failures and amplify heap exhaustion. ## Technical analysis Affected file: `crates/victory-gpu/src/draw.rs`. - [[State::bind — operation rejection](https://github.com/Marvisak/VIctory/blob/ffe310e/crates/victory-gpu/src/draw.rs#L459-L473)](https://github.com/Marvisak/VIctory/blob/ffe310e/crates/victory-gpu/src/draw.rs#L459-L473) - [[State::tables — descriptor reservation and retention](https://github.com/Marvisak/VIctory/blob/ffe310e/crates/victory-gpu/src/draw.rs#L726-L737)](https://github.com/Marvisak/VIctory/blob/ffe310e/crates/victory-gpu/src/draw.rs#L726-L737) The current allocation path allows partial reservations to survive an unsuccessful bind. ### Synthetic example Consider an eight-slot dynamic heap with two occupied slots: 1. A draw requests two fresh tables requiring four and three slots. 2. The first allocation succeeds. 3. The second allocation fails. 4. The draw is rejected, but four newly reserved slots remain occupied. 5. A subsequent operation requiring six contiguous slots cannot allocate them. With transactional reservation, the unsuccessful operation would leave the original six free slots available. This is a synthetic allocator-level example, not a measured in-game workload. ## Proposed investigation Before changing allocator behavior, I developed an opt-in diagnostic patch to quantify: - New descriptor reservations. - Reservations originating in rejected binds. - Reservations subsequently recovered through accepted cache hits. - Outstanding unrecovered reservations. - Peak unrecovered reservations within a command list recording. - Allocation failures occurring while earlier unrecovered reservations exist. - Failed allocation size distributions. The diagnostic patch preserves existing allocation behavior, cache semantics, descriptor lifetimes and bind return values. Enable it using: `VICTORY_DESCRIPTOR_ADMISSION=1` If unrecovered reservations represent a significant fraction of descriptor demand, transactional reservation could complement existing allocator and reclamation improvements. ## CPU-side validation The reservation-policy model was evaluated across 194,074 exhaustive small-heap scenarios. | Metric | Current model | Transactional model | |---|---:|---:| | Rejected operations retaining new reservations | 86,354 | 0 | The diagnostic accounting model was independently validated across: - 40,000 completed bind snapshots. - 180,093 allocation and cache events. - Zero discrepancies against a history-recomputing reference model. All 12 Python tests across both models passed. These results establish the modeled behavior and accounting invariants. They do not establish the frequency or performance impact of this mechanism in the title. ## Relationship to existing work This investigation complements: - #251 — descriptor allocation across the search cursor. - #562 — immutable descriptor table reuse. - #688 — reclamation of descriptor slots from completed command lists. - #840 — avoiding unnecessary dynamic allocations for aligned CBVs. - #887 — descriptor heap capacity pressure. Unlike those approaches, this investigation specifically measures descriptor reservations originating in unsuccessful binds and their subsequent reuse. ## Validation requested The attached package includes: - A diagnostics-only Rust patch targeting `ffe310e`. - Native Rust regression tests. - Python accounting tests. - Build instructions and counter definitions. Native Rust compilation, D3D12/WARP testing and hardware measurements remain pending. The immediate objective is to determine whether this mechanism contributes significantly to descriptor pressure before proposing a production allocator change. Independent validation and feedback would be appreciated. AI-assisted development. No proprietary game files or assets were used. [victory_descriptor_admission.zip](https://github.com/user-attachments/files/35334788/victory_descriptor_admission.zip)
EduAzevedo commented 2026-11-24 14:04:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by EduAzevedo on 2026-11-24T14:01:42Z.


One in-game data point on where this can happen. On an RTX 2070 SUPER (NVIDIA, view heap capped at 1,000,000), integration/testers 92bc27b, which already carries the 2^18 dynamic reserve from #747, logged zero no dynamic slots drops and zero a table is not made in four runs into the first playable section (about 6-11 minutes in the world each). With no failed allocation there is no partial reservation left behind, so on that tree this mechanism does not occur. On plain main with the 2^16 reserve the same card dropped about 262,000 draws for lack of slots in a 16-minute run, so that is where the counters would show something.

I'd be glad to run VICTORY_DESCRIPTOR_ADMISSION=1 on main there, but could you publish the patch as a branch, like the other diagnostics here? I'd rather not build an attached archive.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7133718167 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/911#issuecomment-7133718167). Originally posted by [EduAzevedo](https://github.com/EduAzevedo) on 2026-11-24T14:01:42Z. --- One in-game data point on where this can happen. On an RTX 2070 SUPER (NVIDIA, view heap capped at 1,000,000), `integration/testers` `92bc27b`, which already carries the 2^18 dynamic reserve from #747, logged **zero** `no dynamic slots` drops and zero `a table is not made` in four runs into the first playable section (about 6-11 minutes in the world each). With no failed allocation there is no partial reservation left behind, so on that tree this mechanism does not occur. On plain `main` with the 2^16 reserve the same card dropped about 262,000 draws for lack of slots in a 16-minute run, so that is where the counters would show something. I'd be glad to run `VICTORY_DESCRIPTOR_ADMISSION=1` on `main` there, but could you publish the patch as a branch, like the other diagnostics here? I'd rather not build an attached archive.
MichaelSmithAI commented 2026-11-24 14:05:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by MichaelSmithAI on 2026-11-24T14:04:10Z.


The attached descriptor_admission.patch applied cleanly to ffe310e and built as a Win64 GNU LLVM victory-gpu diagnostics test binary. I ran both Rust census tests under Wine. Both passed, including the case where two accepted cache hits on the same previously rejected reservation recover its slots exactly once. These are CPU-side bookkeeping tests.

The fresh-table ownership behavior also persists on our comparison stack. A successful reservation is cached and attached to the recording before a later table or stage can reject the bind. An accepted bind can subsequently reuse it, and resetting or dropping the recording releases its ranges. #871 changes the allocator's free-range search, so it can prevent some failures but does not roll back a partial bind.

For interpreting a title capture, the unrecovered slot count is more informative than the count of all reservations originating in rejected binds. A failed request observed while slots are pending is an association: the request would also need a sufficiently large contiguous range after reclamation. No title frequency or GPU performance was measured here.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7133789039 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/911#issuecomment-7133789039). Originally posted by [MichaelSmithAI](https://github.com/MichaelSmithAI) on 2026-11-24T14:04:10Z. --- The attached `descriptor_admission.patch` applied cleanly to ffe310e and built as a Win64 GNU LLVM `victory-gpu` diagnostics test binary. I ran both Rust census tests under Wine. Both passed, including the case where two accepted cache hits on the same previously rejected reservation recover its slots exactly once. These are CPU-side bookkeeping tests. The fresh-table ownership behavior also persists on our comparison stack. A successful reservation is cached and attached to the recording before a later table or stage can reject the bind. An accepted bind can subsequently reuse it, and resetting or dropping the recording releases its ranges. #871 changes the allocator's free-range search, so it can prevent some failures but does not roll back a partial bind. For interpreting a title capture, the unrecovered slot count is more informative than the count of all reservations originating in rejected binds. A failed request observed while slots are pending is an association: the request would also need a sufficiently large contiguous range after reclamation. No title frequency or GPU performance was measured here.
andrewpozdnakov7-jpg commented 2026-11-24 15:03:51 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-24T14:06:50Z.


The attached patch also builds and passes on native Windows 10 MSVC at ffe310e. GPU diagnostics: 55 passed, 1 ignored. Clippy passed with diagnostics and -D warnings.

I ran a separate synthetic WARP fixture through State::bind, with six dynamic slots free and two fresh tables of four and three slots. The first bind was rejected and left four pending slots. The same rejected bind incremented failed_with_prior_pending to 1 without recovering the table. A later successful bind reused the four-slot table and moved the census from 4 pending to 4 recovered. Dropping the recording returned those four slots to the allocator.

This exercises the bind hooks and slot accounting under controlled pressure. The fixture did not submit shader work or measure title frequency. AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7133859925 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/911#issuecomment-7133859925). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-24T14:06:50Z. --- The attached patch also builds and passes on native Windows 10 MSVC at `ffe310e`. GPU diagnostics: 55 passed, 1 ignored. Clippy passed with diagnostics and `-D warnings`. I ran a separate synthetic WARP fixture through `State::bind`, with six dynamic slots free and two fresh tables of four and three slots. The first bind was rejected and left four pending slots. The same rejected bind incremented `failed_with_prior_pending` to 1 without recovering the table. A later successful bind reused the four-slot table and moved the census from 4 pending to 4 recovered. Dropping the recording returned those four slots to the allocator. This exercises the bind hooks and slot accounting under controlled pressure. The fixture did not submit shader work or measure title frequency. AI-assisted.
AimLogin commented 2026-11-24 15:03:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by AimLogin on 2026-11-24T14:07:49Z.


Thanks @FunWithFlagsDev for investigating this allocation behavior, and @EduAzevedo for providing the in-game measurements.

The RTX 2070 SUPER results are particularly interesting. Going from approximately 262,000 descriptor-exhaustion-related dropped draws on main to zero across four runs on the integration branch provides further evidence that the increased dynamic reserve discussed in #747 is effective under the tested conditions.

I've been working on a complementary approach here:

https://github.com/AimLogin/VIctory/pull/1

It includes adaptive descriptor heap sizing, separate bounds for direct and table-based bindless accesses, typed null guards, and additional diagnostic and regression tests validated on an RTX 4060 Ti and WARP.

I think the investigation in #911 complements these changes well. Increasing capacity reduces allocation pressure, while transactional reservation could prevent unsuccessful binds from unnecessarily retaining newly allocated slots.

Even if allocation failures disappear with the larger reserve in current workloads, this mechanism may become relevant again as more graphics pipelines become functional and descriptor demand increases.

It would be interesting to compare the admission counters across:

  • Upstream main with the original 2^16 dynamic reserve.
  • The integration branch with the 2^18 reserve.
  • The adaptive heap implementation with bindless guards.
  • A future transactional reservation implementation, if the diagnostic results justify it.

This could help distinguish insufficient capacity from avoidable reservation pressure.

@EduAzevedo, if you have the time, independent testing of my branch would also be greatly appreciated. My validation currently covers synthetic GPU tests rather than actual in-game rendering.

Thanks again for the detailed investigation and hardware testing!

<!-- greyfinch-sync:Marvisak/VIctory:comment:7133886125 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/911#issuecomment-7133886125). Originally posted by [AimLogin](https://github.com/AimLogin) on 2026-11-24T14:07:49Z. --- Thanks @FunWithFlagsDev for investigating this allocation behavior, and @EduAzevedo for providing the in-game measurements. The RTX 2070 SUPER results are particularly interesting. Going from approximately 262,000 descriptor-exhaustion-related dropped draws on main to zero across four runs on the integration branch provides further evidence that the increased dynamic reserve discussed in #747 is effective under the tested conditions. I've been working on a complementary approach here: https://github.com/AimLogin/VIctory/pull/1 It includes adaptive descriptor heap sizing, separate bounds for direct and table-based bindless accesses, typed null guards, and additional diagnostic and regression tests validated on an RTX 4060 Ti and WARP. I think the investigation in #911 complements these changes well. Increasing capacity reduces allocation pressure, while transactional reservation could prevent unsuccessful binds from unnecessarily retaining newly allocated slots. Even if allocation failures disappear with the larger reserve in current workloads, this mechanism may become relevant again as more graphics pipelines become functional and descriptor demand increases. It would be interesting to compare the admission counters across: - Upstream main with the original 2^16 dynamic reserve. - The integration branch with the 2^18 reserve. - The adaptive heap implementation with bindless guards. - A future transactional reservation implementation, if the diagnostic results justify it. This could help distinguish insufficient capacity from avoidable reservation pressure. @EduAzevedo, if you have the time, independent testing of my branch would also be greatly appreciated. My validation currently covers synthetic GPU tests rather than actual in-game rendering. Thanks again for the detailed investigation and hardware testing!
MichaelSmithAI commented 2026-11-24 15:04:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by MichaelSmithAI on 2026-11-24T14:35:24Z.


@EduAzevedo The requested branch is available at diag/911-descriptor-admission. Commit 4935a86 is FunWithFlagsDev’s attached diagnostic patch applied unchanged to ffe310e. Build with the diagnostics feature and set VICTORY_DESCRIPTOR_ADMISSION=1 for the run.

A separate test exercised table preparation on a real descriptor heap on RTX 4090 under Wine/vkd3d-proton 3.2. With three slots free, the first two-slot CBV table stayed cached when the second two-slot request failed. Preparing the first table again returned the same offset and moved two slots from pending to recovered. Dropping the recording made that same range allocatable again. All three focused tests passed. This control submitted no GPU work. The title measurement still needed is how many slots remain pending when later requests fail, along with the widths of those requests.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7134623141 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/911#issuecomment-7134623141). Originally posted by [MichaelSmithAI](https://github.com/MichaelSmithAI) on 2026-11-24T14:35:24Z. --- @EduAzevedo The requested branch is available at [diag/911-descriptor-admission](https://github.com/MichaelSmithAI/VIctory/tree/diag/911-descriptor-admission). Commit [4935a86](https://github.com/MichaelSmithAI/VIctory/commit/4935a86b5a18082b7a3838e66108187eb8a5b516) is FunWithFlagsDev’s attached diagnostic patch applied unchanged to `ffe310e`. Build with the `diagnostics` feature and set `VICTORY_DESCRIPTOR_ADMISSION=1` for the run. A separate test exercised table preparation on a real descriptor heap on RTX 4090 under Wine/vkd3d-proton 3.2. With three slots free, the first two-slot CBV table stayed cached when the second two-slot request failed. Preparing the first table again returned the same offset and moved two slots from pending to recovered. Dropping the recording made that same range allocatable again. All three focused tests passed. This control submitted no GPU work. The title measurement still needed is how many slots remain pending when later requests fail, along with the widths of those requests.
EduAzevedo commented 2026-11-24 17:04:41 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by EduAzevedo on 2026-11-24T16:46:10Z.


@EduAzevedo The requested branch is available at diag/911-descriptor-admission. Commit 4935a86 is FunWithFlagsDev’s attached diagnostic patch applied unchanged to ffe310e. Build with the diagnostics feature and set VICTORY_DESCRIPTOR_ADMISSION=1 for the run.

A separate test exercised table preparation on a real descriptor heap on RTX 4090 under Wine/vkd3d-proton 3.2. With three slots free, the first two-slot CBV table stayed cached when the second two-slot request failed. Preparing the first table again returned the same offset and moved two slots from pending to recovered. Dropping the recording made that same range allocatable again. All three focused tests passed. This control submitted no GPU work. The title measurement still needed is how many slots remain pending when later requests fail, along with the widths of those requests.

The title measurement, with the branch @MichaelSmithAI published (4935a86, unchanged).

Setup: RTX 2070 SUPER (Turing, driver 610.88, view heap capped at 1,000,000), Windows 11 26200. Diag build of ffe310e + #493 + #189 + #206 (the set that keeps the world up on NVIDIA, #71) + 4935a86, original 2^16 dynamic reserve, VICTORY_DESCRIPTOR_ADMISSION=1, VICTORY_SHADER_LOOP_LIMIT=32. One run into the first playable section; the sums below are over every recording_end census line from entering the world to 6 minutes later (9,958 recordings). The same run logged up to 32,768 no dynamic slots drops.

counter (summed) value
accepted / rejected binds 608,057 / 33,292
new slots reserved 3,970,493
slots reserved by binds later rejected 110,180 (2.8 % of new)
of those, recovered by a later accepted hit 102
still pending at the end of their recording 110,078
peak pending slots in one recording 849
recordings ending with pending slots 1,494 of 9,958
failed requests 34,659
slots those requests asked for 2,380,353 (~69 each)
failed while slots were pending 18,625 (54 %)

Failed request widths: 2-4: 304, 5-16: 16,679, 17-64: 3,288, 65-256: 12,782, 257-1024: 1,606.

Reading it:

  • The mechanism is real in the title: almost nothing reserved by a rejected bind is reused (102 of 110,180 slots), so those slots stay held until the recording is reset.
  • But it is small against the shortage. At most 849 slots are pending in any one recording, about 1.3 % of the 65,536 dynamic slots, while the failed requests asked for 2.38 million slots in the same time, many of them 65-256 wide. Even with every pending slot returned, most of those requests would still fail.
  • So on this card the failures are capacity first, which the 2^18 reserve of #747 removes (zero failures on integration/testers here, above). Transactional reservation would trim the pending slots, but by itself it would not stop the drops; it could matter later if demand grows past 2^18.

AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7138178273 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/911#issuecomment-7138178273). Originally posted by [EduAzevedo](https://github.com/EduAzevedo) on 2026-11-24T16:46:10Z. --- > [@EduAzevedo](https://github.com/EduAzevedo) The requested branch is available at [diag/911-descriptor-admission](https://github.com/MichaelSmithAI/VIctory/tree/diag/911-descriptor-admission). Commit [4935a86](https://github.com/MichaelSmithAI/VIctory/commit/4935a86b5a18082b7a3838e66108187eb8a5b516) is FunWithFlagsDev’s attached diagnostic patch applied unchanged to `ffe310e`. Build with the `diagnostics` feature and set `VICTORY_DESCRIPTOR_ADMISSION=1` for the run. > > A separate test exercised table preparation on a real descriptor heap on RTX 4090 under Wine/vkd3d-proton 3.2. With three slots free, the first two-slot CBV table stayed cached when the second two-slot request failed. Preparing the first table again returned the same offset and moved two slots from pending to recovered. Dropping the recording made that same range allocatable again. All three focused tests passed. This control submitted no GPU work. The title measurement still needed is how many slots remain pending when later requests fail, along with the widths of those requests. The title measurement, with the branch @MichaelSmithAI published (`4935a86`, unchanged). **Setup:** RTX 2070 SUPER (Turing, driver 610.88, view heap capped at 1,000,000), Windows 11 26200. Diag build of `ffe310e` + #493 + #189 + #206 (the set that keeps the world up on NVIDIA, #71) + `4935a86`, **original 2^16 dynamic reserve**, `VICTORY_DESCRIPTOR_ADMISSION=1`, `VICTORY_SHADER_LOOP_LIMIT=32`. One run into the first playable section; the sums below are over every `recording_end` census line from entering the world to 6 minutes later (9,958 recordings). The same run logged up to 32,768 `no dynamic slots` drops. | counter (summed) | value | |---|---:| | accepted / rejected binds | 608,057 / 33,292 | | new slots reserved | 3,970,493 | | slots reserved by binds later rejected | 110,180 (2.8 % of new) | | of those, recovered by a later accepted hit | **102** | | still pending at the end of their recording | **110,078** | | **peak pending slots in one recording** | **849** | | recordings ending with pending slots | 1,494 of 9,958 | | failed requests | 34,659 | | slots those requests asked for | 2,380,353 (~69 each) | | failed while slots were pending | 18,625 (54 %) | Failed request widths: 2-4: 304, 5-16: 16,679, 17-64: 3,288, 65-256: 12,782, 257-1024: 1,606. **Reading it:** - The mechanism is real in the title: almost nothing reserved by a rejected bind is reused (102 of 110,180 slots), so those slots stay held until the recording is reset. - But it is small against the shortage. At most 849 slots are pending in any one recording, about 1.3 % of the 65,536 dynamic slots, while the failed requests asked for 2.38 million slots in the same time, many of them 65-256 wide. Even with every pending slot returned, most of those requests would still fail. - So on this card the failures are capacity first, which the 2^18 reserve of #747 removes (zero failures on `integration/testers` here, above). Transactional reservation would trim the pending slots, but by itself it would not stop the drops; it could matter later if demand grows past 2^18. AI-assisted.
Marvisak commented 2026-11-25 07:03:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T06:59:30Z.


Automated triage for the maintainers.

Confirmed on main: in State::tables (crates/victory-gpu/src/draw.rs), each fresh table goes into fresh_tables and dynamic as soon as host.dynamic(n) succeeds. If a later table then fails, table_failed drops the draw or dispatch, but the earlier reservations stay with the recording until it is released. A later bind of the same table can reuse them.

Open PR #1126 ("release descriptor tables after a rejected bind") addresses this. As the comment above says, it needs a rebase onto current main. The diagnostic census attached to the issue is a measurement, not a fix.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7155369968 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/911#issuecomment-7155369968). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T06:59:30Z. --- <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-25T07:34:36Z at=2026-11-25T09:50:38Z --> Automated triage for the maintainers. Confirmed on `main`: in `State::tables` (`crates/victory-gpu/src/draw.rs`), each fresh table goes into `fresh_tables` and `dynamic` as soon as `host.dynamic(n)` succeeds. If a later table then fails, `table_failed` drops the draw or dispatch, but the earlier reservations stay with the recording until it is released. A later bind of the same table can reuse them. Open PR #1126 ("release descriptor tables after a rejected bind") addresses this. As the comment above says, it needs a rebase onto current `main`. The diagnostic census attached to the issue is a measurement, not a fix. --- _Generated by [Claude Code](https://claude.ai/code)_
JurajSimicevic commented 2026-11-25 08:06:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by JurajSimicevic on 2026-11-25T07:34:36Z.


An open pull request for this exists: #1126 (opened 2026-11-24, reviewed by several people). It needs a rebase; a rebased branch is offered in its thread.

AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7156015553 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/911#issuecomment-7156015553). Originally posted by [JurajSimicevic](https://github.com/JurajSimicevic) on 2026-11-25T07:34:36Z. --- An open pull request for this exists: #1126 (opened 2026-11-24, reviewed by several people). It needs a rebase; a rebased branch is offered in its thread. AI-assisted.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory#911
No description provided.