Two victory-gpu tests assume a host whose shader-visible heap reaches HEAP_VIEWS, so they fail on hosts that cap it (Intel Arc here) while CI cannot see either #3178
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#3178
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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:15 UTC · original
Two
victory-gputests onmainassert a descriptor-heap size no D3D12 device can provide, so they fail on every machine that has a GPU and are skipped on CImain63bcca4, Windows 11, Intel Arc iGPU (driver 32.0.101.6127), Rust 1.98.1:Both reproduce on unmodified
main— I re-ran them on a clean tree fromcodeloadwith the same toolchain, and nothing else was applied.The first one cannot pass anywhere
crates/victory-shader/src/shader.rs:33:HostHeap::newcreates the heap with the count it is given (descriptor/host.rs:110-121), and the test asks forHostHeap::new(false, 4), then asserts the heap has at leastHEAP_VIEWSdescriptors.2_097_152is aboveD3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2(1,000,000), so no device can satisfy it: this is not a driver difference, the assertion is unsatisfiable by construction.The padding the comment describes is on the buffers, not the heap (
descriptor/host.rs:122-131):stridesandmarksareupload_buffer(count.max(HEAP_VIEWS) * …), and the comment says shaders read the table as a root view "at indices clamped belowHEAP_VIEWS", "also past a capped heap". So the heap holdingcountdescriptors is the design, and the assertion is stale — presumably from before the heap indices changed.The second looks like the same change
memory.rs:1030expects a pair index>= 1 << 18— "past the dynamic slots". If the dynamic-slot split moved with the same bindless/heap work, the expectation is stale in the same way. I have not traced which constant it should now compare against, so I am not claiming what the right number is.Why CI does not see either
HostHeap::newstarts withlet host = host()?(descriptor/host.rs:104) and returnsNonewhen there is no D3D12 device, and the test doeslet Some(heap) = … else { return; }.windows-latesthas no GPU, so both tests pass by returning early — which is exactly the configuration CI runs.So these two have been failing for whoever runs the suite on real hardware, and green for everyone else.
What I would do
dynamic_slots_are_held_until_released: assert what the design guarantees instead — the heap has the count it was made with, and the stride/mark buffers haveHEAP_VIEWSentries. If the intent was really "every index a shader can reach exists", the buffer is what has to be checked, notGetDesc().NumDescriptors.lists_share_a_table_and_copies_keep_their_views: compare against the constant the split now uses.I have not opened a PR for it because the right assertions depend on what the dynamic-slot split is meant to be now, and that is a maintainer call rather than something to guess from the two failures.
No game files were used. Found while running the suite for #967; AI-assisted (Claude).
@zzm1234560621-prog on GitHub · 2026-11-26 11:34 UTC · original
Narrowed one of the two, and opened #3191 for it.
dynamic_slots_are_held_until_released— fixed in #3191 (test-only). The assertion wasNumDescriptors >= HEAP_VIEWS, andHEAP_VIEWS(2^21) is abovePORTABLE_VIEWS(10^6), soHostHeap::new's first attempt at(count + DYNAMIC).max(HEAP_VIEWS)fails on any host that caps shader-visible heaps and the heap keepscount + MIN_DYNAMICinstead. It now assertstotal >= heap.count + heap.dynamic, which holds on both paths. On this machine that takes the suite from 2 failures to 1.lists_share_a_table_and_copies_keep_their_views— this one is not about the cap, so I left it alone.pair_ofreturns the pair's slot, and on this machine it returns(2, 4), not something past1 << 18. So the pairs are allotted low now, next to each other, and the1 << 18in the assertion is stale in a second way: it is not asking "past the capped dynamic range", it is asking "pastDYNAMIC", which the current layout does not do at all.If the intent of that assertion is the one in the test's doc comment — "the copies' views stay where they are for later lists and submissions, also when another copy comes; none takes a per-draw dynamic slot" — then the check that means it is: the two indices are distinct, even (a pair), and unchanged after the second submission. If instead the pairs are supposed to live above the dynamic range, then the allocation is what moved, and
(2, 4)is the evidence.Either answer is a two-line change; say which and I will add it to #3191 or a second PR.
Test-only. Tested with AI assistance (Claude).
@zed6000 on GitHub · 2026-11-26 11:55 UTC · original
A data point from a GPU where both tests pass. On an AMD RX 7900 XTX (Windows 11),
main63bcca4:cargo test -p victory-gpu --lockedpasses (231/0 lib, 1 ignored). Run by name with--test-threads=1,dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_viewsboth execute and pass. So this driver creates the shader-visible view heap atHEAP_VIEWS(2^21) or more, and the assertion can be met there. "Fail on every GPU" holds for hosts that cap shader-visible heaps (the Intel Arc here, the NVIDIA onesHostHeap::newnames), not for all of them. #3191 (78524a7) merged onto63bcca4also passes here (231/0), so its narrowed assertion works on both kinds of host.Two victory-gpu tests assert a descriptor-heap size no device can provide, so they fail on every GPU and are skipped on CIto Two victory-gpu tests assume a host whose shader-visible heap reaches HEAP_VIEWS, so they fail on hosts that cap it (Intel Arc here) while CI cannot see either@andrewpozdnakov7-jpg on GitHub · 2026-11-26 12:06 UTC · original
@zzm1234560621-prog I measured the software path as well. Native D3D12 reported Tier 3 on both inbox WARP and app-local SDK 620 with WARP 1.0.22. Both accepted a shader-visible heap requested at 2,097,152 descriptors, and
GetDesc()returned that exact size. Microsoft documents 1,000,000 for Tiers 1 and 2 and a higher possible limit for Tier 3. D3D12 hardware tiersOn main
63bcca43the two existing tests both reached their checks and passed on app-local WARP. With diagnostic prints added to those tests, the first used 2,097,152 total, 4 title slots and 262,144 dynamic slots. The memory test allocated pairs beginning at 262,146 and 262,148. On the capped path,HostHeap::pairfalls back todynamic(2)when the separate pair range has no space, which explains the reported low pair indices. #2937 handles the tests on capped hosts and #3122 addresses the dedicated pair reservation.AI-assisted with Codex. Synthetic D3D12 tests.
@zzm1234560621-prog on GitHub · 2026-11-26 12:06 UTC · original
Correcting myself on two counts from zed6000's RX 7900 XTX run, since both were in my framing rather than in the tests.
1. "No device can provide it" is wrong.
HEAP_VIEWSis 2^21 andPORTABLE_VIEWS(10^6) is whatHostHeap::newcalls the tier 1/2 limit; a tier-3 host — the RX 7900 XTX — makes the heap at 2^21 or more, so the assertion is meetable there, andmainpasses both tests on that card. The right statement is the narrower one: on hosts that cap shader-visible heaps (the NVIDIA onesnewnames, and the Intel Arc here)newtakes theMIN_DYNAMICbranch and the assertion cannot hold. I have changed the title to say that.2. That also makes my "the second failure is not about the cap" wrong. zed6000 runs
lists_share_a_table_and_copies_keep_their_viewsby name on the 7900 XTX and it passes, sopairs >= 1 << 18holds where the heap takes the full range. On this Intel it is(2, 4). So both failures are one class — capped host — and the pair slots sit low exactly where the heap does, rather than the layout having moved for everyone as I wrote. Sorry for the misdirection.What that leaves: the reason
pair_ofreturns(2, 4)rather thancount + MIN_DYNAMICon the capped path is still unexplained by me, and I would rather not guess twice. If the intent is that the pairs sit past whatever dynamic range the host took, the assertion wantscount + dynamic(the same quantity #3191 uses) rather than either constant; if(2, 4)is correct on a capped host, the assertion wants to be skipped there. One line either way, and I will add whichever you prefer to #3191.The rest of #3191 stands as zed6000 verified: merged onto
63bcca4it passes on the 7900 XTX (231/0) and on the Arc (230/1, the one being this test).Test-only. AI-assisted (Claude).
@zzm1234560621-prog on GitHub · 2026-11-26 12:19 UTC · original
Thanks — that closes the loop on my mistake and sharpens the failing set.
So the heap is creatable at
HEAP_VIEWSon tier 3, and your measurement adds that WARP reports tier 3 and takes 2,097,152 as well. With the RX 7900 XTX result above, the assertion is meetable on: tier-3 hardware, and the software adapter. What fails is exactly the hosts capped at tier 1/2 — this Intel Arc, and the NVIDIA onesHostHeap::new'sshortcutcomment names — wherenewfalls back tocount + MIN_DYNAMIC.That also explains why CI has been green without anyone noticing: the runner has no hardware adapter, but WARP is a device,
host()succeeds on it, and on a tier-3 WARP the test passes rather than skipping.#3191 sidesteps the whole question: it asserts
count + dynamic, the rangenewguarantees on either path, and zed6000 confirmed it still passes on the 7900 XTX (231/0) as well as here. If you would rather keep assertingHEAP_VIEWSwhen the host is tier 3 and assert the shorter range otherwise, that is also two lines and I will redo #3191 that way — the tier is oneCheckFeatureSupportaway.Test-only. AI-assisted (Claude).
github-bot referenced this issue2026-11-26 14:27:17 +00:00
@zzm1234560621-prog on GitHub · 2026-11-26 15:31 UTC · original
A third site with the same assumption, found by running
cargo test -p victory-gpu --libon this host (Intel Arc Xe-LPG, 1M cap):1 << 18is the dynamic-slot region of a heap sized toHEAP_VIEWS; on a host capped at 1,000,000 the allocation lands below it, so the assertion fails for the same reason as the two in this issue — not because the tables or the copy-on-write views are wrong (the0x100,0x200read above it passes).So the count is three:
descriptor::host::tests::dynamic_slots_are_held_until_releasedand the two range assertions here, andmemory::tests::lists_share_a_table_and_copies_keep_their_views. #3191 fixes the first; I have not touched the memory one, since it is a different question (where the dynamic region starts on a capped heap, not how much room the test asks for) and it should be decided together with theHEAP_VIEWSquestion this issue is open about.For the record, the same run on that host: 238 passed, 2 failed, 1 ignored — the two failures being exactly the first and third of those.
No game files. AI-assisted (Claude).
@zzm1234560621-prog on GitHub · 2026-11-26 15:59 UTC · original
The memory one turned out not to be a cap arithmetic problem, and it has a diagnosis worth having here because it bears on the
HEAP_VIEWSquestion: on a capped host the heap's pair region is empty, not merely small.HostHeap::pairallocates fromcount + dynamicup topairs_end, and on this host (1M cap,MIN_DYNAMIC= 1 << 16):So the copies' views are not "misplaced"; the region they would come from does not exist on this heap shape, and taking dynamic slots is the design's fallback (
free_pairbranches on exactly that boundary). The test was asserting a layout, not a behaviour.I have PRs for both halves now:
HEAP_VIEWSworth of room (how much the test requests);>= 1 << 18, now gated on the pair region existing (has_pair_region), with the read assertions untouched.Neither decides
HEAP_VIEWS; both stop a test from encoding an answer to it. What is still open for the maintainers is the one this issue is about: whether a capped host should be given the larger dynamic range at all, or whether the shaders' clamp should follow the heap the host can actually make — with #3286's numbers, the second reading at least keeps the pair region reachable on such a host.With both applied,
cargo test -p victory-gpu --libon this capped host goes 229/2 → 231/0.No game files. AI-assisted (Claude).