GPU: capped view heaps keep the full dynamic range (NVIDIA) #1751

Closed
github-bot wants to merge 1 commit from github-bot/gh-1751 into main AGit
Owner

@⁠JurajSimicevic on GitHub · 2026-11-24 21:59 UTC · original
JurajSimicevic:gpu/capped-heap-dynamic → main · +27 −4 · 1 files · 1 commits · closed without merging

Since c75fdba the larger dynamic range (DYNAMIC, 2^18 slots) is only given where the host takes a view heap of at least HEAP_VIEWS (2^21). NVIDIA refuses shader-visible view heaps over 1,000,000 descriptors, so every view heap there fell to MIN_DYNAMIC (2^16). The same change made two tests fail on every NVIDIA host (reported in #1744 and in #1633).

Scope (edited after Machad3x's check in the title): this covers title heaps of up to 737,856 views (1,000,000 - DYNAMIC) and the two tests. It does not change GTA VI's world. The title asks for 1,245,184 views, so its heap still takes the capped fallback with MIN_DYNAMIC, and the drops for lack of dynamic slots (#59, #1496) remain. #1779 covers that heap.

What

  • descriptor/host.rs, HostHeap::new: after (count + DYNAMIC).max(HEAP_VIEWS) is refused, try (count + DYNAMIC).max(PORTABLE_VIEWS) before falling to MIN_DYNAMIC. A capped host gets every title slot, the full dynamic range and, past them, room for the host copies' view pairs (crate::memory), as an uncapped one does. Indices past the heap still fault there, as the existing shortcut says; that part is unchanged.
  • Heaps whose count + DYNAMIC exceeds PORTABLE_VIEWS keep today's path (MIN_DYNAMIC, then the cap). #1548 is about that case and doesn't overlap with this.
  • dynamic_slots_are_held_until_released: the HEAP_VIEWS size is asserted where the host takes a heap that large, and the full dynamic range everywhere.

Tests

RTX 5080 (driver 32.0.16.1742), Windows 11 26200: this host refuses a 2^21 heap and accepts 1,000,000.

  • cargo test -p victory-gpu --locked: 78 passed (on main: 76 passed, 2 failed, dynamic_slots_are_held_until_released and lists_share_a_table_and_copies_keep_their_views).
  • cargo clippy --workspace --all-targets [--all-features] --locked -- -D warnings: clean.
  • cargo test --workspace --locked: the 3 victory-shader failures from #1744 remain; that crate doesn't depend on this change.

In the game: not checked

Later, on main 940d32f without this change (which now reaches the world on this host): the title's heap is capped at 1,000,000 with 65,536 dynamic slots. Machad3x's log in the comments shows the same with this change, as the scope above says.

main at 70564ae currently stops on this NVIDIA host (#1753) about 7 s after start, before the world: CreateUnorderedAccessView on a B5G5R5A1_UNORM texture (no typed UAV support), then DXGI_ERROR_INVALID_CALL. Plain main and this branch stop the same way (same message, same 310,720 title slot past the host heap warnings), so the drop counts in the world couldn't be compared yet.

AI-assisted (Claude Code).

🤖 Generated with Claude Code

**@⁠JurajSimicevic** on GitHub · 2026-11-24 21:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/1751) `JurajSimicevic:gpu/capped-heap-dynamic` → `main` · +27 −4 · 1 files · 1 commits · closed without merging Since c75fdba the larger dynamic range (`DYNAMIC`, 2^18 slots) is only given where the host takes a view heap of at least `HEAP_VIEWS` (2^21). NVIDIA refuses shader-visible view heaps over 1,000,000 descriptors, so every view heap there fell to `MIN_DYNAMIC` (2^16). The same change made two tests fail on every NVIDIA host (reported in #1744 and in #1633). **Scope (edited after Machad3x's check in the title):** this covers title heaps of up to 737,856 views (`1,000,000 - DYNAMIC`) and the two tests. It does not change GTA VI's world. The title asks for 1,245,184 views, so its heap still takes the capped fallback with `MIN_DYNAMIC`, and the drops for lack of dynamic slots (#59, #1496) remain. #1779 covers that heap. ## What - `descriptor/host.rs`, `HostHeap::new`: after `(count + DYNAMIC).max(HEAP_VIEWS)` is refused, try `(count + DYNAMIC).max(PORTABLE_VIEWS)` before falling to `MIN_DYNAMIC`. A capped host gets every title slot, the full dynamic range and, past them, room for the host copies' view pairs (`crate::memory`), as an uncapped one does. Indices past the heap still fault there, as the existing shortcut says; that part is unchanged. - Heaps whose `count + DYNAMIC` exceeds `PORTABLE_VIEWS` keep today's path (`MIN_DYNAMIC`, then the cap). #1548 is about that case and doesn't overlap with this. - `dynamic_slots_are_held_until_released`: the `HEAP_VIEWS` size is asserted where the host takes a heap that large, and the full dynamic range everywhere. ## Tests RTX 5080 (driver 32.0.16.1742), Windows 11 26200: this host refuses a 2^21 heap and accepts 1,000,000. - `cargo test -p victory-gpu --locked`: 78 passed (on `main`: 76 passed, 2 failed, `dynamic_slots_are_held_until_released` and `lists_share_a_table_and_copies_keep_their_views`). - `cargo clippy --workspace --all-targets [--all-features] --locked -- -D warnings`: clean. - `cargo test --workspace --locked`: the 3 `victory-shader` failures from #1744 remain; that crate doesn't depend on this change. ## In the game: not checked Later, on `main` `940d32f` without this change (which now reaches the world on this host): the title's heap is capped at 1,000,000 with 65,536 dynamic slots. Machad3x's log in the comments shows the same with this change, as the scope above says. `main` at 70564ae currently stops on this NVIDIA host (#1753) about 7 s after start, before the world: `CreateUnorderedAccessView` on a `B5G5R5A1_UNORM` texture (no typed UAV support), then `DXGI_ERROR_INVALID_CALL`. Plain `main` and this branch stop the same way (same message, same 310,720 `title slot past the host heap` warnings), so the drop counts in the world couldn't be compared yet. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Since the heap must hold HEAP_VIEWS for the larger dynamic range, a host
that caps shader-visible view heaps at 1,000,000 (NVIDIA) fell to
MIN_DYNAMIC on every view heap, the size that ran out in the world
(#59). Such a host now gets a heap of PORTABLE_VIEWS: every title slot,
the full dynamic range and room for host copies' view pairs. The heap
test asserts the HEAP_VIEWS size only where the host takes it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:43:37 +00:00
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 22:01 UTC · original

Same on Ampere: RTX 3070 8 GB, driver 616.56, Windows 11, debug. cargo test -p victory-gpu --locked:

  • main 70564ae: 76 passed, 2 failed (dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views), 1 ignored;
  • this PR: 78 passed, 0 failed, 1 ignored.

Overlap for the reviewers: #1349 gives capped NVIDIA view heaps the full DYNAMIC range too. It does that with capped_split, which takes the dynamic range out of the cap, plus a draw.rs change, and it is based on ffe310e, before c75fdba's HEAP_VIEWS clamp. This PR is the smaller change on current main. #1349 also covers the count + DYNAMIC > PORTABLE_VIEWS case that this PR leaves to #1548.

AI-assisted (Claude Code). Synthetic tests only.

**@⁠upipibi** on GitHub · 2026-11-24 22:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/1751#issuecomment-7145701976) Same on Ampere: RTX 3070 8 GB, driver 616.56, Windows 11, debug. `cargo test -p victory-gpu --locked`: - `main` `70564ae`: 76 passed, 2 failed (`dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`), 1 ignored; - this PR: 78 passed, 0 failed, 1 ignored. Overlap for the reviewers: #1349 gives capped NVIDIA view heaps the full `DYNAMIC` range too. It does that with `capped_split`, which takes the dynamic range out of the cap, plus a `draw.rs` change, and it is based on `ffe310e`, before c75fdba's `HEAP_VIEWS` clamp. This PR is the smaller change on current `main`. #1349 also covers the `count + DYNAMIC > PORTABLE_VIEWS` case that this PR leaves to #1548. AI-assisted (Claude Code). Synthetic tests only.
Author
Owner

@⁠BaggyALPHA on GitHub · 2026-11-25 02:19 UTC · original

Independent synthetic Windows verification on an RTX 3080 (driver 621.24). I applied each current PR head separately to upstream 940d32f and ran cargo test -p victory-gpu --locked -- --test-threads=1.

Tree Passed Failed Ignored
Upstream 940d32f 141 2 2
With #1548 (7866124) 142 2 2
With #1751 (4521591) 143 0 2

The two failures on upstream and #1548 were dynamic_slots_are_held_until_released and lists_share_a_table_and_copies_keep_their_views. Both pass with #1751. That distinguishes the small-heap fallback covered here from the large-heap cap in #1548. No game files were used.

AI-assisted (OpenAI Codex).

**@⁠BaggyALPHA** on GitHub · 2026-11-25 02:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/1751#issuecomment-7150584459) Independent synthetic Windows verification on an RTX 3080 (driver 621.24). I applied each current PR head separately to upstream `940d32f` and ran `cargo test -p victory-gpu --locked -- --test-threads=1`. | Tree | Passed | Failed | Ignored | | --- | ---: | ---: | ---: | | Upstream `940d32f` | 141 | 2 | 2 | | With #1548 (`7866124`) | 142 | 2 | 2 | | With #1751 (`4521591`) | 143 | 0 | 2 | The two failures on upstream and #1548 were `dynamic_slots_are_held_until_released` and `lists_share_a_table_and_copies_keep_their_views`. Both pass with #1751. That distinguishes the small-heap fallback covered here from the large-heap cap in #1548. No game files were used. AI-assisted (OpenAI Codex).
Author
Owner

@⁠fiestorra on GitHub · 2026-11-25 02:32 UTC · original

Measured on this machine, alone on main 940d32f: the cap and the 310,720 slots are still there, and so is the removal

I ran it to help triage the four pull requests on this ground (#1779, #1777, this, and #1770), so a maintainer does not have to guess which one to take. Merge of this branch onto 940d32f was clean; release build, session 1 (interactive desktop), RTX 4090, driver 32.0.16.2124, empty cache, 70 s:

host view heap capped at 1000000                     1
title slot past the host heap                        310,720
no host texture … 2560x1440 format 115               1
host GPU device removed                              2
frames presented                                     64

against main alone on the same machine and the same scenario: identical on all five lines.

So this branch, by itself, does not change what the title's own log says about the capped heap: the slots past the mirror are still 310,720, the missing 1440p texture is still missing, and the run still dies at frame 64. That is not necessarily a criticism of the change — keeping the full dynamic range on a capped heap is a real thing to fix — but it means it is not the branch that resolves the sidetracked symptom chain in #1952, and a reviewer comparing the four should not expect it to.

For contrast, from my own measurements on the same machine and the same 70 s scenario:

build title slot past the host heap 2,048 frames
main 310,720 94 s
main + #1779 0 70 s
main + this 310,720 died at frame 64
main + #1832 + #1630 (mine) 310,720 removal and missing texture gone, cap untouched

That is the whole comparison I can offer: on this hardware #1779 is the one that takes the slots to zero and moves the frame rate, and this one does neither by itself. If the two do different things — yours keeps the dynamic range the cap takes away, #1779 removes the indices past the cap — then the honest outcome is that they are complementary, and the maintainer should know which symptom each one answers before merging either.

I have not reviewed the diff beyond building it. What I can say is that it merges cleanly onto today's main, builds, and changes nothing visible on this card — which is information in itself, because a change on the descriptor heap should have shown up in that log one way or the other.

No game data is involved: counts and warnings.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-25 02:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/1751#issuecomment-7150860544) **Measured on this machine, alone on `main` `940d32f`: the cap and the 310,720 slots are still there, and so is the removal** I ran it to help triage the four pull requests on this ground (#1779, #1777, this, and #1770), so a maintainer does not have to guess which one to take. Merge of this branch onto `940d32f` was clean; release build, session 1 (interactive desktop), RTX 4090, driver `32.0.16.2124`, empty cache, 70 s: ``` host view heap capped at 1000000 1 title slot past the host heap 310,720 no host texture … 2560x1440 format 115 1 host GPU device removed 2 frames presented 64 ``` against `main` alone on the same machine and the same scenario: identical on all five lines. So this branch, by itself, does not change what the title's own log says about the capped heap: the slots past the mirror are still 310,720, the missing 1440p texture is still missing, and the run still dies at frame 64. That is not necessarily a criticism of the change — keeping the full dynamic range on a capped heap is a real thing to fix — but it means **it is not the branch that resolves the sidetracked symptom chain in #1952**, and a reviewer comparing the four should not expect it to. For contrast, from my own measurements on the same machine and the same 70 s scenario: | build | `title slot past the host heap` | 2,048 frames | |---|---|---| | `main` | 310,720 | 94 s | | `main` + #1779 | **0** | **70 s** | | `main` + this | 310,720 | died at frame 64 | | `main` + #1832 + #1630 (mine) | 310,720 | removal and missing texture gone, cap untouched | That is the whole comparison I can offer: on this hardware #1779 is the one that takes the slots to zero and moves the frame rate, and this one does neither by itself. If the two do different things — yours keeps the dynamic range the cap takes away, #1779 removes the indices past the cap — then the honest outcome is that they are complementary, and the maintainer should know which symptom each one answers before merging either. I have not reviewed the diff beyond building it. What I can say is that it merges cleanly onto today's `main`, builds, and changes nothing visible on this card — which is information in itself, because a change on the descriptor heap should have shown up in that log one way or the other. No game data is involved: counts and warnings. Written with an AI assistant.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:40 UTC · original · edited 2026-11-25 14:53 UTC

Automated triage for the maintainers.

Merge candidate (small; the maintainer should decide it together with #1779). In descriptor/host.rs, HostHeap::new gains one more step: when the HEAP_VIEWS-sized view heap is refused, it tries (count + DYNAMIC).max(PORTABLE_VIEWS) before dropping to MIN_DYNAMIC, so capped hosts (NVIDIA, 1,000,000 views) keep the full DYNAMIC range. Heaps with count + DYNAMIC > PORTABLE_VIEWS still take the existing path. The dynamic slots and pairs (count + extra .. total) fit inside the heap, and dynamic_slots_are_held_until_released now asserts HEAP_VIEWS only where the host accepts it. Testers on three NVIDIA cards report that the two heap-cap test failures are fixed.

On your reply: agreed. The title's heap (1,245,184 views) is past PORTABLE_VIEWS - DYNAMIC (737,856), so it never reaches the new branch. This change helps smaller heaps and the two NVIDIA test failures, not the world's dropped draws. Correcting the description as you plan is all that is needed here. #1779 covers the same tests and the title's heap. If it lands, this PR adds nothing and can be closed; until then it is a safe, small step. That choice is the maintainer's.

CI: no check runs on the head commit.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 03:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/1751#issuecomment-7152136570) · edited 2026-11-25 14:53 UTC <!-- victory-triage v1 head=45215912b47461e8f1b04be5db700da344e416bb verdict=merge-candidate at=2026-11-25T14:58:00Z --> Automated triage for the maintainers. **Merge candidate (small; the maintainer should decide it together with #1779).** In `descriptor/host.rs`, `HostHeap::new` gains one more step: when the `HEAP_VIEWS`-sized view heap is refused, it tries `(count + DYNAMIC).max(PORTABLE_VIEWS)` before dropping to `MIN_DYNAMIC`, so capped hosts (NVIDIA, 1,000,000 views) keep the full `DYNAMIC` range. Heaps with `count + DYNAMIC > PORTABLE_VIEWS` still take the existing path. The dynamic slots and `pairs` (`count + extra .. total`) fit inside the heap, and `dynamic_slots_are_held_until_released` now asserts `HEAP_VIEWS` only where the host accepts it. Testers on three NVIDIA cards report that the two heap-cap test failures are fixed. On your reply: agreed. The title's heap (1,245,184 views) is past `PORTABLE_VIEWS - DYNAMIC` (737,856), so it never reaches the new branch. This change helps smaller heaps and the two NVIDIA test failures, not the world's dropped draws. Correcting the description as you plan is all that is needed here. #1779 covers the same tests and the title's heap. If it lands, this PR adds nothing and can be closed; until then it is a safe, small step. That choice is the maintainer's. CI: no check runs on the head commit. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠Machad3x on GitHub · 2026-11-25 11:21 UTC · original

Note from an RTX 3080 Ti (driver 621.24, Windows 11 26300): for this title this change does not reach its new branch.

The title asks for 1,245,184 views. count + DYNAMIC is then over PORTABLE_VIEWS, so make((count + DYNAMIC).max(PORTABLE_VIEWS)) is refused too, count + MIN_DYNAMIC is refused, and the capped fallback runs with MIN_DYNAMIC. The log on a build with this PR (main 940d32f plus this and other open fixes):

host view heap capped at 1000000 ... count=1245184
no room for the null buffer views: ... count=934464 total=1000000

1,000,000 - 934,464 = 65,536 dynamic slots, and a draw or dispatch dropped: no dynamic slots for its tables still appears (up to dropped=32768 in a 7-minute run).

The new branch helps only title heaps with count + DYNAMIC <= 1,000,000 (such as the test's small heap). #1548 changes the capped fallback itself; I have not run it.

AI-assisted (Claude Code).

**@⁠Machad3x** on GitHub · 2026-11-25 11:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/1751#issuecomment-7160946329) Note from an RTX 3080 Ti (driver 621.24, Windows 11 26300): for this title this change does not reach its new branch. The title asks for 1,245,184 views. `count + DYNAMIC` is then over `PORTABLE_VIEWS`, so `make((count + DYNAMIC).max(PORTABLE_VIEWS))` is refused too, `count + MIN_DYNAMIC` is refused, and the capped fallback runs with `MIN_DYNAMIC`. The log on a build with this PR (`main` `940d32f` plus this and other open fixes): ``` host view heap capped at 1000000 ... count=1245184 no room for the null buffer views: ... count=934464 total=1000000 ``` `1,000,000 - 934,464 = 65,536` dynamic slots, and `a draw or dispatch dropped: no dynamic slots for its tables` still appears (up to `dropped=32768` in a 7-minute run). The new branch helps only title heaps with `count + DYNAMIC <= 1,000,000` (such as the test's small heap). #1548 changes the capped fallback itself; I have not run it. AI-assisted (Claude Code).
Author
Owner

@⁠JurajSimicevic on GitHub · 2026-11-25 13:04 UTC · original

@⁠Machad3x you're right, and thanks for checking it in the title. The title asks for 1,245,184 views. count + DYNAMIC only fits under 1,000,000 for count up to 737,856, so the title's heap never reaches the new branch. My own runs on the RTX 5080 log the same thing: the heap is capped at 1,000,000 with 65,536 dynamic slots, and draws are still dropped.

The description says so in its second bullet, but it also opens with the world's drops from #59 and #1496, which reads as if this change helps there. It doesn't for this title. I'll edit the description to say plainly what it covers: title heaps up to 737,856 views, and the two tests that fail on every NVIDIA host.

#1779 covers both of those and also the title's heap (block remap, dynamic range on capped hosts). If #1779 is the direction you take, this PR adds nothing beside it and I'll close it. If you'd rather have this small change first, it stays as it is.

AI-assisted.

**@⁠JurajSimicevic** on GitHub · 2026-11-25 13:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/1751#issuecomment-7163260862) @⁠Machad3x you're right, and thanks for checking it in the title. The title asks for 1,245,184 views. `count + DYNAMIC` only fits under 1,000,000 for `count` up to 737,856, so the title's heap never reaches the new branch. My own runs on the RTX 5080 log the same thing: the heap is capped at 1,000,000 with 65,536 dynamic slots, and draws are still dropped. The description says so in its second bullet, but it also opens with the world's drops from #59 and #1496, which reads as if this change helps there. It doesn't for this title. I'll edit the description to say plainly what it covers: title heaps up to 737,856 views, and the two tests that fail on every NVIDIA host. #1779 covers both of those and also the title's heap (block remap, dynamic range on capped hosts). If #1779 is the direction you take, this PR adds nothing beside it and I'll close it. If you'd rather have this small change first, it stays as it is. AI-assisted.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 01:01 UTC · original

Independent RTX 5090 (1M view-heap cap hardware) + WARP head-to-head comparison (against #2461) at head 45215912b474 merged cleanly onto main (63bcca43c6a0):

  • victory-gpu (descriptor::host::tests + memory::tests, VICTORY_D3D12_DEBUG=1):
    • RTX 5090: 23/23 passed — fixes both dynamic_slots_are_held_until_released and lists_share_a_table_and_copies_keep_their_views.
    • WARP (--features diagnostics): 23/23 passed.
  • victory-shader (stride_tests, dxil.dll 10.0.26100.0, VICTORY_D3D12_DEBUG=1):
    • RTX 5090: 6/8 passed, 2 failed — a_heap_buffer_read_where_no_buffer_view_is_reads_zeros still fails with dispatch failed: E_INVALIDARG (plus the pre-existing Blackwell baseline a_heap_buffer_read_by_element_takes_the_views_stride).
  • Comparison with #2461:
    • Because #1751 only adds the 1,000,000-view fallback in HostHeap::new (descriptor/host.rs) without updating victory-shader's HEAP_VIEWS / NULL_BUFFER_VIEW (2^21 - 1), descriptor/host.rs:207-210 (null < total) cannot reserve the null buffer view on a 1M heap and shaders still clamp OOB heap reads to 2^21 - 1.
    • In comparison, #2461 threads view_heap_limit() / null_buffer_view() through victory-gpu, shader_cache.rs, and victory-shader, fixing all three NVIDIA 1M-cap failures on RTX 5090 (including a_heap_buffer_read_where_no_buffer_view_is_reads_zeros).
  • Other checks: cargo xtask policy (191 files ok), cargo clippy -p victory-gpu --all-targets -- -D warnings (default + --features diagnostics, 0 warnings).

Between the two mutually exclusive approaches, #2461 is the more complete fix on NVIDIA 1M-cap hardware.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 01:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/1751#issuecomment-7179347864) Independent RTX 5090 (1M view-heap cap hardware) + WARP head-to-head comparison (against `#2461`) at head `45215912b474` merged cleanly onto `main` (`63bcca43c6a0`): - **`victory-gpu` (`descriptor::host::tests` + `memory::tests`, `VICTORY_D3D12_DEBUG=1`)**: - RTX 5090: **23/23 passed** — fixes both `dynamic_slots_are_held_until_released` and `lists_share_a_table_and_copies_keep_their_views`. - WARP (`--features diagnostics`): **23/23 passed**. - **`victory-shader` (`stride_tests`, `dxil.dll` 10.0.26100.0, `VICTORY_D3D12_DEBUG=1`)**: - RTX 5090: **6/8 passed, 2 failed** — `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros` still fails with `dispatch failed: E_INVALIDARG` (plus the pre-existing Blackwell baseline `a_heap_buffer_read_by_element_takes_the_views_stride`). - **Comparison with `#2461`**: - Because `#1751` only adds the 1,000,000-view fallback in `HostHeap::new` (`descriptor/host.rs`) without updating `victory-shader`'s `HEAP_VIEWS` / `NULL_BUFFER_VIEW` (`2^21 - 1`), `descriptor/host.rs:207-210` (`null < total`) cannot reserve the null buffer view on a 1M heap and shaders still clamp OOB heap reads to `2^21 - 1`. - In comparison, `#2461` threads `view_heap_limit()` / `null_buffer_view()` through `victory-gpu`, `shader_cache.rs`, and `victory-shader`, fixing all three NVIDIA 1M-cap failures on RTX 5090 (including `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`). - **Other checks**: `cargo xtask policy` (`191 files ok`), `cargo clippy -p victory-gpu --all-targets -- -D warnings` (default + `--features diagnostics`, 0 warnings). Between the two mutually exclusive approaches, `#2461` is the more complete fix on NVIDIA 1M-cap hardware.
github-bot closed this pull request 2026-11-26 11:11:26 +00:00
Author
Owner

@⁠JurajSimicevic on GitHub · 2026-11-26 11:04 UTC · original

Closing this in favour of #2461.

For this title, #1751 never helps: the title asks for 1,245,184 views, so its heap never reaches the new branch (Machad3x's note above), and on NVIDIA it still gets 65,536 dynamic slots. #2461 makes the heap at the host's cap with the full 2^18 dynamic range, and lowers the shaders' view limit and null buffer view to match.

  • lhnizdo measured it in the world on an RTX 2080. With 262,144 dynamic slots, no draws were dropped for want of dynamic slots in 10 minutes. With 65,533, 512 or more were dropped.
  • On an RTX 5090, fuzeofficlal found that #2461 fixes the two tests this PR fixes, and also a_heap_buffer_read_where_no_buffer_view_is_reads_zeros.

#1779 covers the same ground. Whichever of the two the maintainers take, this PR adds nothing beside it.

The dynamic range matters for the picture too. In my dumps on #841 on the RTX 5080, the G-buffer stayed nearly empty while 2,188 to 2,880 draws per frame were dropped for dynamic slots.

Thanks @⁠Machad3x and @⁠fuzeofficlal for checking it.

AI-assisted.

**@⁠JurajSimicevic** on GitHub · 2026-11-26 11:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/1751#issuecomment-7190222327) Closing this in favour of #2461. For this title, #1751 never helps: the title asks for 1,245,184 views, so its heap never reaches the new branch (Machad3x's note above), and on NVIDIA it still gets 65,536 dynamic slots. #2461 makes the heap at the host's cap with the full 2^18 dynamic range, and lowers the shaders' view limit and null buffer view to match. - lhnizdo measured it in the world on an RTX 2080. With 262,144 dynamic slots, no draws were dropped for want of dynamic slots in 10 minutes. With 65,533, 512 or more were dropped. - On an RTX 5090, fuzeofficlal found that #2461 fixes the two tests this PR fixes, and also `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`. #1779 covers the same ground. Whichever of the two the maintainers take, this PR adds nothing beside it. The dynamic range matters for the picture too. In my [dumps on #841](https://git.gtahub.st/github/Marvisak--VIctory/issues/841) on the RTX 5080, the G-buffer stayed nearly empty while 2,188 to 2,880 draws per frame were dropped for dynamic slots. Thanks @⁠Machad3x and @⁠fuzeofficlal for checking it. AI-assisted.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1751
No description provided.