GPU tests: the two view-heap tests say when a host caps the heap #2937
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2937
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2937"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@HoLa-Lee on GitHub · 2026-11-26 00:52 UTC · original
HoLa-Lee:tests/view-heap-cap-skip→main· +30 −3 · 2 files · 1 commits · openWhat this fixes
Two tests fail on every NVIDIA host on every run of
main, and have since70564ae:dynamic_slots_are_held_until_releasedopens with the premise "every index a translated shader can reach exists (clamped belowHEAP_VIEWS)" and assertsheap.NumDescriptors >= HEAP_VIEWS.lists_share_a_table_and_copies_keep_their_viewsasserts the copies' view pairs sit "past the dynamic slots" (>= 1 << 18).Both premises only hold on a host that takes a heap of
HEAP_VIEWS(2,097,152). A host that caps shader-visible view heaps below it keeps the capped heap -HostHeap::newsays so in its own comment, and D3D12 says so at creation. On the machine this was measured on (RTX 4080 SUPER, driver 616.87), with the debug layer on:and the heap the host ends up with is 65,540 descriptors. That is FIND-9 in the coordination thread, and it is why an NVIDIA runner shows two failures in a pull request that has nothing to do with them.
What changed
Both tests now read the heap they actually got and skip with one line naming the numbers:
That is the pattern the other host-capability tests here already use (
no host mesh shader support; skipped,no host depth bounds support; skipped). On a host that takes the full heap both assertions run exactly as before, and the sampler heap's own assertion still runs everywhere (its cap is under every host's limit).Measured
cargo test -p victory-gpu --lib --profile diag --features diagnostics(RTX 4080 SUPER)cargo clippy -p victory-gpu --all-features -- -D warningsTwo files, +28/-3:
descriptor/host.rs(the check and the skip),memory.rs(the same, before the test's first use of the premise).What this does not do
The limitation itself is untouched: on such a host, a shader's index past the capped heap is the documented shortcut in
HostHeap::new("a host that caps its heaps belowHEAP_VIEWS(NVIDIA) faults on an index past them, as before the clamp"), not a clamp. Making that correct is a different piece of work from these two tests being red - and this PR deliberately does not hide a failure, it states a host capability the tests need and says so out loud, the way the mesh-shader and depth-bounds tests do.Filed against FIND-9 in #1633 (
claiming: FIND-9), where the same machine's numbers are recorded.`dynamic_slots_are_held_until_released` opens with "every index a translated shader can reach exists (clamped below `HEAP_VIEWS`)" and asserts the heap has at least `HEAP_VIEWS` descriptors; `lists_share_a_table_and_copies_keep_their_views` asserts the copies' view pairs sit "past the dynamic slots" (`>= 1 << 18`). Both premises only hold on a host that takes a heap of `HEAP_VIEWS`. A host that caps shader-visible view heaps below it keeps the capped heap: `HostHeap::new` says so in a comment, and D3D12 says so at creation. Measured here (RTX 4080 SUPER, driver 616.87), with the debug layer on: ID3D12Device::CreateDescriptorHeap: D3D12_DESCRIPTOR_HEAP_DESC.NumDescriptors 2097152, but the limit for shader visible view heaps is 1000000 and the heap the host ends up with is **65,540 descriptors**. So both tests fail on this machine on every run, and have since `70564ae` - that is FIND-9 in the coordination thread, and it is why a pull request's CI on an NVIDIA runner shows two failures that have nothing to do with the pull request. Both now read the heap they got and skip with one line that names the numbers, the way the other host-capability tests here already do ("no host mesh shader support; skipped", "no host depth bounds support; skipped"). Nothing is weakened on a host that takes the full heap: the assertions run there exactly as before, and the sampler heap's own assertion still runs everywhere (it is under every cap). cargo test -p victory-gpu --lib --profile diag --features diagnostics 246 passed, 0 failed, 1 ignored (before: 244 passed, 2 failed) `cargo clippy -p victory-gpu --all-features -- -D warnings` is clean. The limitation itself stays and is untouched: on such a host a shader's index past the capped heap is the documented shortcut in `HostHeap::new`, not a clamp. That is a different piece of work from these two tests being red.3446deb65dto95aeee6993@kotekompotek on GitHub · 2026-11-26 00:53 UTC · original
Honest skips in the right place — both tests' premises only hold where the host actually builds a
HEAP_VIEWSheap, and a capped host (NVIDIA tier-2, 1,000,000) takes the documented shortcut path instead. The query-then-skip shape with the reason printed is the right form for host-dependent assertions. Compatible with #2936'sHEAP_VIEWS= 1,000,000 too: a capped heap of 999,424 still trips the< HEAP_VIEWSguard correctly.@fuzeofficlal on GitHub · 2026-11-26 01:02 UTC · original
Independent RTX 5090 (1M view-heap cap) + WARP verification at head
3446deb65d06merged cleanly ontomain(63bcca43c6a0):VICTORY_D3D12_DEBUG=1):descriptor::host::tests memory::tests23/23 passed (printshost view heap capped at 65536 descriptors (HEAP_VIEWS is 2097152); skippedand65540 ... skipped).--features diagnostics):descriptor::host::tests memory::tests23/23 passed (both tests run in full without skipping).cargo xtask policy:191 files ok;cargo clippy --locked -p victory-gpu --tests -- -D warnings(default +--features diagnostics): 0 warnings.crates/victory-gpu/src/descriptor/host.rs:2230-2240):memory::tests::lists_share_a_table_and_copies_keep_their_views(memory.rs:975-982) makes sense on cappedmainheaps wherepairs == total.descriptor/host.rs:2230-2240insidedynamic_slots_are_held_until_releasedalso skips lines2238-2294on NVIDIA — which test the sampler heap size (samplers >= HEAP_SAMPLERS),release_retired()COM refcount release (2244-2285), andheap.dynamicnon-wrapping allocation (2286-2294). All three only needMIN_DYNAMIC(65,536) and run cleanly on a 65,540-slot RTX 5090 heap.views >= HEAP_VIEWSassertion (rather than returning out of the entire test) so NVIDIA keeps regression coverage for lines2238-2294. (Also note#2461resolves the underlying 1M heap cap directly if merged.)@Marvisak on GitHub · 2026-11-26 04:26 UTC · original · edited 2026-11-26 07:23 UTC
Automated triage for the maintainers.
Merge candidate. Thanks,
95aeee6does what was asked. Indescriptor::host::tests::dynamic_slots_are_held_until_released, only theviews >= HEAP_VIEWSassertion is now skipped when the host caps the view heap. The sampler-heap assertion, themake_null/release_retiredcheck and the non-wrappingheap.dynamicchecks run on every host.memory::tests::lists_share_a_table_and_copies_keep_their_viewskeeps its skip, since its premise cannot hold on a capped heap. The change is test-only. A small nit: theassert!in theelsebranch is always true and could go.CI: not run on this head.
Generated by Claude Code
@HoLa-Lee on GitHub · 2026-11-26 05:51 UTC · original
Fixed in
95aeee6- and you were right, the description was wrong about the sampler assertion: the earlyreturnskipped it.dynamic_slots_are_held_until_releasednow reads the heap it got, prints when it is capped, and skips only the assertion that every shader index exists:Everything after that block runs on either host: the sampler-heap assertion,
make_null/release_retired's retired-slot release, and the non-wrappingheap.dynamicchecks.memory::tests::lists_share_a_table_and_copies_keep_their_viewskeeps its skip - as you say, its premise (none takes a per-draw dynamic slot) cannot hold on a capped host at all.The comment now also names #2461, so a reader knows the cap is meant to go rather than being a fixture of the design.
@Dukestar69 on GitHub · 2026-11-26 02:06 UTC · original · approved these changes
Tested merged onto
origin/main(63bcca4) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP):cargo test -p victory-gpu --lib descriptor::host::tests::dynamic_slots_are_held_until_released: 1 passed (printshost view heap capped at 65540 descriptors (HEAP_VIEWS is 2097152); skippedon RTX 5090 instead of failing with#1744).cargo test -p victory-gpu --lib memory::tests::lists_share_a_table_and_copies_keep_their_views: 1 passed (printshost view heap capped at 65536 descriptors (HEAP_VIEWS is 2097152); skippedon RTX 5090).cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Cleanly turns the two known NVIDIA 1M view-heap cap false failures into explicit, informative skips.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@fyernald on GitHub · 2026-11-26 02:22 UTC · original · reviewed
One interaction to know about: #2461 (triaged as a merge candidate) fixes the cause of these two failures. With it, a capped host gets a view heap at its cap, and shaders clamp to that cap. Both tests then run and pass on a capped card.
Checked on an RTX 3080 (617.42, 1,000,000-view cap), Windows 10,
main63bcca4:dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand #2461'scapped_view_heap_preserves_title_slots_and_reserves_nullsall pass. The heap is 1,000,000 views.descriptor/host.rs, because #2461 turns that assertion into>= view_heap_limit(). Thememory.rschange merges cleanly, and then skips a test that passes:So if #2461 lands, this should be dropped, or compare against
view_heap_limit()rather thanHEAP_VIEWS. Otherwise, on NVIDIA it turns two now-passing tests into skips. If #2461 doesn't land, the skip is an honest stopgap.@fuzeofficlal on GitHub · 2026-11-26 12:07 UTC · original · approved these changes
Reviewed and verified at head
95aeee69againstorigin/main(63bcca43) on Windows 11 across both an NVIDIA RTX 5090 (1,000,000 shader-visible view-heap cap) and WARP (uncapped 2,097,152 view heap) withVICTORY_D3D12_DEBUG=1:crates/victory-gpu/src/descriptor/host.rs:2231-2242(dynamic_slots_are_held_until_released) now skips only theviews >= HEAP_VIEWSassertion on capped hosts while still executing the sampler-heap assertion,make_null/release_retiredCOM refcount checks, and non-wrappingheap.dynamicchecks (so regressions inHostHeap::newsizing belowMIN_DYNAMICor slot lifetime remain caught on NVIDIA).crates/victory-gpu/src/memory.rs:975-982(lists_share_a_table_and_copies_keep_their_views) skips cleanly with the actual descriptor count whenslots < HEAP_VIEWS, whereHostHeap::new(false, 0)falls back to 65,536 slots and copy views cannot sit past1 << 18.else { assert!(views >= victory_shader::emit::HEAP_VIEWS); }branch (descriptor/host.rs:2238-2240) is trivially true and can be omitted; also note for maintainers that if#2461lands (sizing capped hosts toview_heap_limit()= 1,000,000 so both tests pass),memory.rs:976would need to compare againstview_heap_limit()rather thanHEAP_VIEWS(or this stopgap can be dropped in favor of#2461).git merge-treeagainstorigin/main(63bcca43);cargo xtask policy(191 files ok);cargo clippy -p victory-gpu --all-targets -- -D warningsclean with default features and--all-features.--features diagnostics+VICTORY_D3D12_DEBUG=1):descriptor::host::tests15/15 passed (dynamic_slots_are_held_until_releasedprintshost view heap capped at 65540 descriptors (HEAP_VIEWS is 2097152): the assertion that every shader index exists is skippedand runs all remaining assertions) andmemory::tests8/8 passed (lists_share_a_table_and_copies_keep_their_viewsprintshost view heap capped at 65536 descriptors (HEAP_VIEWS is 2097152); skipped).VICTORY_D3D12_WARP=1,--features diagnostics+VICTORY_D3D12_DEBUG=1): both tests pass in full with zero skip output;descriptor::host::tests15/15 andmemory::tests8/8 passed.LGTM.
95aeee6993to935836f6c2@HoLa-Lee on GitHub · 2026-11-26 12:17 UTC · original
Nit taken (
935836f): the ssert! in the else branch was always true - iews < HEAP_VIEWS is the whole condition - so it is gone, and the capped case is a plain if that prints the numbers. Nothing else changed:nhost view heap capped at 65540 descriptors (HEAP_VIEWS is 2097152): the assertion that every shader index exists is skippedn246 passed / 0 failed / 1 ignored on an RTX 4080 SUPER, and thanks for reading it closely enough to catch a tautology.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.