GPU tests: the two view-heap tests say when a host caps the heap #2935
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from Marvisak/VIctory. Originally posted by HoLa-Lee on 2026-11-26T00:52:00Z.
What 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.Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-26T00:53:25Z.
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.Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T01:02:56Z.
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.)Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T02:06:10Z.
Review: APPROVED
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).
Imported from Marvisak/VIctory. Originally posted by fyernald on 2026-11-26T02:22:59Z.
Review: COMMENTED
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.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T04:26:40Z.
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
Imported from Marvisak/VIctory. Originally posted by HoLa-Lee on 2026-11-26T05:51:23Z.
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.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T12:07:20Z.
Review: APPROVED
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.
Imported from Marvisak/VIctory. Originally posted by HoLa-Lee on 2026-11-26T12:17:42Z.
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.
Imported from Marvisak/VIctory. Originally posted by artor410 on 2026-11-28T08:19:18Z.
NVIDIA Ampere check of
ba5f085, merged cleanly ontomain63bcca4(treeba5f085). RTX 3070 Ti 8 GB (Ampere, view heap capped at 1,000,000), driver 610.88, Windows 11, rustc 1.98.1, hardware adapter. Synthetic tests only.Command:
cargo test -p victory-gpu --lib, then the two #3178 tests with--nocapture --test-threads=1.main: 229 pass / 2 fail (dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views).Output here:
host view heap capped at 65540 descriptors ... skippedandcapped at 65536 descriptors; skipped. The second test returns early, so on NVIDIA it checks nothing.Side by side with #1770, #2251, #2937, #3191 and #3244 in #3178.
(Claude Code, Claude Opus 5.5.)
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.