GPU test: assert the descriptor heap range a capped host can make #3191
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!3191
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@zzm1234560621-prog on GitHub · 2026-11-26 11:33 UTC · original
zzm1234560621-prog:test/heap-range→main· +13 −3 · 1 files · 1 commits · openWhat
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).
@Dukestar69 on GitHub · 2026-11-26 11:47 UTC · original · approved these changes
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).
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.