NVIDIA RTX 4060: test failures and a crash from descriptor heaps capped below HEAP_VIEWS (1 << 21) #3445
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#3445
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?
@kalberts0089-hash on GitHub · 2026-11-27 02:52 UTC · original
Hardware / software
63bcca4(main, same asupstream/mainat time of writing)cargo testonly.Summary
HEAP_VIEWS = 1 << 21(shader.rs:33) is larger than the descriptor heap this NVIDIA cardprovides (about 1,000,000, cf.
PORTABLE_VIEWS). On this cardHostHeap::newtakes thecapped fallback, and tests that assume a full-size heap fail. All shader failures below
disappear under
VICTORY_WARP=1, so they're specific to the NVIDIA hardware path.The heap-cap failures (both
victory-gputests anda_heap_buffer_read_where_no_buffer_view_is_reads_zeros) look like one root cause. The crash in heap_direct_texture_reads_mark_their_heap_index turned out to be unrelated; see the comment below.The other stride test (
a_heap_buffer_read_by_element_takes_the_views_stride) and the NaNgather test may be separate; the NaN one may be a test expectation tied to AMD behaviour.
Happy to split those out into their own issues if that's easier to track.
victory-gpudescriptor::host::tests::dynamic_slots_are_held_until_released: assertionheap.heap.GetDesc().NumDescriptors >= victory_shader::emit::HEAP_VIEWSfails (host.rs:2226).The fallback heap is
count + MIN_DYNAMIC.memory::tests::lists_share_a_table_and_copies_keep_their_views: panics"past the dynamic slots" (
memory.rs:1030). The fallback reservesMIN_DYNAMIC(1 << 16),not
DYNAMIC(1 << 18).victory-shaderemit::memory_tests::heap_direct_texture_reads_mark_their_heap_index: the test binarycrashes with
0xc0000005STATUS_ACCESS_VIOLATION, no output first. Passes underVICTORY_WARP=1.emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros:hardware: dispatch failed: The parameter is incorrect.The test heap isHEAP_VIEWSslots when views end in
View::NullBuffers(emit/host.rs:1545).emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride:got
[101, 104, 107, ..., 131, 0, ...], expected[200..=231]. Lane l reads dword3·(3l+1): the shader's rawelement × strideaddressing plus the test host's structuredview (stride 12,
emit/host.rs:1790) apply the stride twice on NVIDIA.emit/mod.rssaysthese views should be raw.
emit::synthetic_tests::gathers_at_a_level_match_the_hardware: lane 0 (NaN u coordinate)got
[0.0, 1.0, 0.0, 0.0], expected all zeros. NaN gather results differ by vendor.Steps to reproduce
cargo test --workspace --no-fail-fastcargo test -p victory-shader --lib -- --test-threads=1(shows the crashing test)cargo test -p victory-shader --lib -- --test-threads=1 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index→ 298 passed, 3 failed
VICTORY_WARP=1→ the crash and both stride tests passcargo test -p victory-gpu --lib→ 229 passed, 2 failed (the two above)Possibly related
38277675("make tables past a capped host viewheap afresh"). The
HEAP_VIEWSclamp (emit/mod.rs, "Heap indices", 2026-11-24) cameafter #11 closed, and
host.rs:156notes capped NVIDIA heaps still fault on indices past them.fix/tests-without-gpubranch (66d9dc3) doesn't affect these: it only skips hardwarechecks on a software adapter, and the RTX 4060 is a real hardware adapter.
Investigation done with Claude Code's help. Happy to test any fixes on this card.
@kalberts0089-hash on GitHub · 2026-11-27 03:15 UTC · original
Update on the
heap_direct_texture_reads_mark_their_heap_indexcrash: I ran it undercdb, and it is not related to the heap cap.The access violation is in NVIDIA's driver (
nvwgf2umx.dll), called fromHost::dispatchatemit/host.rs:1922(SetComputeRoot32BitConstants). It is a read from address0x4.The test's shader has no user data (
shader.user_datahas length 0 at the crash), somemory_tests.rs:731buildsvec![0u32; shader.user_data_dwords() as usize], an emptyVec. Its pointer is Rust's dangling placeholder0x4. That gets passed asSetComputeRoot32BitConstants(0, 0, 0x4, 0). NVIDIA's driver reads from the pointer even when the count is 0; WARP (and presumably AMD) doesn't.Other code paths already avoid this with
.max(1)(emit/host.rs:229for the root signature,emit/host.rs:610). This test call doesn't. Suggested fix: add.max(1)there, or haveHost::dispatchskipRoot::Constantswith no data. The same unguarded pattern is also atmemory_tests.rs:269, 461, 597, 879andvalu_tests.rs:395; those pass here, presumably because their shaders have user data.So the crash is separate from the heap-cap failures. Happy to open it as its own issue, or send a small PR for the fix, if you prefer.
@kalberts0089-hash on GitHub · 2026-11-27 04:01 UTC · original
Note: the heap-cap part of this overlaps with #3344, #3411 and #3330 (same cap on other NVIDIA cards), and the by-element stride failure may be #3366. Happy for this to be folded into those. The new finding here is the access violation, which is separate; there's a fix in the linked PR.