GPU test: assert the descriptor heap range a capped host can make #3189
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3191"
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 zzm1234560621-prog on 2026-11-26T11:33:47Z.
What
descriptor::host::tests::dynamic_slots_are_held_until_releasedassertedwith
HEAP_VIEWS = 1 << 21(2,097,152) incrates/victory-shader/src/shader.rsand
PORTABLE_VIEWS = 1_000_000indescriptor/host.rs.HostHeap::newfirst tries
make((count + DYNAMIC).max(HEAP_VIEWS)); a host that capsshader-visible view heaps below that — the NVIDIA ones the
shortcutcommentin
newnames — falls back tocount + MIN_DYNAMIC. On such a host theassertion cannot hold, and the test fails on every run of the suite.
It now asserts the range both paths guarantee: the title's slots plus the
dynamic range the heap settled on.
The sampler half (
>= HEAP_SAMPLERS, 2048) is unchanged: that one is belowthe cap on every device.
Why CI is green today
HostHeap::newstarts withlet host = host()?and returnsNonewithout aD3D12 device, and the test returns early on
None.windows-latesthas noGPU, so CI passes the test by never reaching the assertion — which is why
this has been failing only for people running the suite on real hardware.
Measured
Intel Arc iGPU (Xe-LPG, driver 32.0.101.6127), Windows 11, Rust 1.98.1,
main63bcca4:dynamic_slots_are_held_until_releasedNumDescriptors >= HEAP_VIEWS)cargo test -p victory-gpucargo clippy -p victory-gpu --all-targets -- -D warnings: clean.Not in this PR
The other failure in that run,
memory::tests::lists_share_a_table_and_copies_keep_their_views(
assert!(pairs.0 >= 1 << 18 && pairs.1 >= 1 << 18, "past the dynamic slots")),is a different expectation: on this machine
pair_ofreturns(2, 4), so thepair slots are allotted low now and the
1 << 18is stale in a way that is notabout the heap cap. I have not changed it — what those indices are supposed to
be is a call on the dynamic-slot layout — and reported it with these numbers in
#3178.
Test-only change; no behaviour is affected. Found while running the suite for
#967. Tested with AI assistance (Claude).
Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T11:47:21Z.
Review: APPROVED
Verified on RTX 5090 (1M view-heap cap) & WARP against
origin/main(63bcca4):cargo test -p victory-gpu --lib descriptor::host:: -- --test-threads=1: 15/15 passed on RTX 5090 and WARP (includingdynamic_slots_are_held_until_released).cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Cleanly asserts the descriptor heap range a capped host can actually allocate.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by Jackster on 2026-11-26T23:02:21Z.
Windows 11,
63bcca4+ this PR, Radeon RX 7900 XTX:cargo test -p victory-gpu --lib: 231 passed / 0 failed / 1 ignored — the same count as unpatched63bcca4(this strengthens an existing test rather than adding one).cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.Caveat: this host does not cap the view heap, so the capped-heap branch it asserts is the one a capped driver (NVIDIA's 1M limit, or WARP) would exercise; here the uncapped branch is what runs. Synthetic only. AI-assisted.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T23:48:31Z.
I tested the two assertion changes together in
67577b5, using exact #319178524a7and #3286b83c07d. Both Windows WARP runs per configuration used the same synthetic data. In the forced-cap fixture I rejected descriptor allocation requests above 1,000,000 and let D3D12 create the smaller heap through the existing fallback.mainOn capped
main, the first memory readback succeeded before the old pair-index assertion fired. The combined tests also completed the second submission and retained its readback and view checks. The fork commit contains just the two PRs' test changes. Strict GPU Clippy in both configurations and the asset policy passed.@zzm1234560621-prog, both exact heads are compatible as proposed. The combined branch is available if the maintainers prefer to take the two test fixes together.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-27T01:39:38Z.
Review: APPROVED
Looks good. Updating the capacity assertion in
dynamic_slots_are_held_until_released(crates/victory-gpu/src/descriptor/host.rs:2232) fromHEAP_VIEWStoheap.count + heap.dynamicmatches how capped shader-visible view heaps (such as 1M-descriptor NVIDIA adapters) are sized while keeping the bound tight on 2M adapters.Verified on commit
78524a786676cd452f6d49f8a83b4283678560e3:cargo xtask policypassed (191 files ok).cargo clippy -p victory-gpu(--lib,--tests, and--features diagnostics --tests,-D warnings) passed cleanly.descriptor::host::testspassed 15/15 on both an NVIDIA RTX 5090 (1M capped heap) and WARP (2M heap) withVICTORY_D3D12_DEBUG=1and zero debug-layer errors.Imported from Marvisak/VIctory. Originally posted by kalberts0089-hash on 2026-11-27T08:14:50Z.
NVIDIA test report: RTX 4070 Ti (desktop, driver 621.01), Windows 11 Pro, rustc 1.98.1. Head
78524a7(base main63bcca4).cargo test -p victory-gpu --lib -- --test-threads=1: 230 passed, 1 failed, 1 ignored (main: 229 / 2 / 1).dynamic_slots_are_held_until_releasedfails on main here (NumDescriptors >= HEAP_VIEWS, capped 1M heap) and passes with this PR. The remaining failure is the other known capped-heap one,lists_share_a_table_and_copies_keep_their_views(memory.rs:1030, "past the dynamic slots"), which this PR doesn't touch (#3286).cargo test -p victory-shader --lib --no-fail-fast, skippingheap_direct_texture_reads_mark_their_heap_index(#2571): 298 passed, 3 failed, 3 ignored, same as main. The 3 are the known NVIDIA failures (a_heap_buffer_read_by_element_takes_the_views_stride,a_heap_buffer_read_where_no_buffer_view_is_reads_zeros,gathers_at_a_level_match_the_hardware), unrelated to this PR.Synthetic tests only, no game files. AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by artor410 on 2026-11-28T08:19:19Z.
NVIDIA Ampere check of
78524a7, merged cleanly ontomain63bcca4(tree78524a7). 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).lists_share_a_table_and_copies_keep_their_viewsstill panics atmemory.rs:1030(past the dynamic slots).This PR changes only the first test, so it fixes half of #3178 on NVIDIA.
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.