Repository navigation
GPU test: assert the descriptor heap range a capped host can make - #3191
Open
zzm1234560621-prog wants to merge 1 commit into
Open
zzm1234560621-prog wants to merge 1 commit into
zzm1234560621-prog wants to merge 1 commit into
Conversation
`dynamic_slots_are_held_until_released` asserted `GetDesc().NumDescriptors >= HEAP_VIEWS`, and `HEAP_VIEWS` is 2^21 while `PORTABLE_VIEWS` is 10^6: a host that caps shader-visible view heaps — the NVIDIA ones `new` names, and the Intel Arc iGPU this was found on — takes the shorter `MIN_DYNAMIC` range instead, so the assertion fails on every such host and would pass only on tier-3 hardware. CI does not see it because `HostHeap::new` returns `None` without a D3D12 device and the test returns early there. It now asserts what `new` guarantees on both paths: the title's slots plus the dynamic range the heap settled on. Found while running the suite for Marvisak#967. The other failure in that run, `memory`'s `lists_share_a_table_and_copies_keep_their_views` (`>= 1 << 18`), is a separate, older expectation about the pair slots; it is left alone and reported in Marvisak#3178. cargo test -p victory-gpu on an Intel Arc iGPU (driver 32.0.101.6127): 230 passed, 1 failed, 1 ignored — the failure is the memory test above, which fails on `main` too. cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.
Dukestar69
approved these changes
Nov 26, 2026
Dukestar69
left a comment
There was a problem hiding this comment.
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).