Shader tests: heap_direct_texture_reads_mark_their_heap_index kills the test process on a real GPU (RTX 5070, main 67e8ae1) #2571
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#2571
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?
@welisonzika14-jpg on GitHub · 2026-11-25 16:03 UTC · original
Machine: RTX 5070, driver 621.24, Windows 11, Rust 1.98.1 (MSVC).
Head tested: origin/main
67e8ae1(da82e44is in its history).The test
emit::memory_tests::heap_direct_texture_reads_mark_their_heap_indexloops over two devices in one process: first "hardware", then "warp". Command:cargo test -p victory-shader --lib --locked heap_direct_texture_reads_mark_their_heap_index -- --nocapture.VICTORY_WARP=1(both passes use WARP): 3 of 3 runs pass.67e8ae1("the compute harness zeroes its UAVs"), and here WARP passes too. But CI only has WARP, so it cannot see the crash on a real GPU.Bisect between
940d32f(good) and67e8ae1, running the test on hardware (81 commits): the first bad commit is2d6c0df"Shader: read marks only for texture views taken from the heap itself" (Marvis, 2026-11-25). That commit also adds this test, so I cannot say whether the crash is in the shader change or in the test's heap setup. I have not proven the cause.Whole victory-shader suite on
67e8ae1, hardware: the run aborts with the same access violation at that test. With that test skipped: 266 passed, 3 failed (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). WithVICTORY_WARP=1: 267 passed, 3 failed (a_mask_joined_with_data_at_a_uniform_loop_is_its_number and permutes_read_the_lane_named_and_zero_from_lanes_left_out: "no pipeline for a wave of 32"; gathers_at_a_level_match_the_hardware: lane 4).This matches what #2547 describes on an RX 6700 XT (access violation in the same test), so it is not only NVIDIA.
Written with AI help (Claude/Kiro); the numbers are from runs on my machine.
github-bot referenced this issue2026-11-26 05:10:00 +00:00
@welisonzika14-jpg on GitHub · 2026-11-25 16:22 UTC · original
More data on the same desktop RTX 5070 (driver 621.24 = 32.0.16.2124), Windows 11, main
67e8ae1(still the head when I checked). Halfect also sees this abort on hardware in #2546.What I measured:
Host::dispatch, aftercompute_pipelinereturned OK (I put eprintln markers around the two calls, local only, reverted).View::NullBuffers. AddingView::NullBuffers(heap of 2^21 slots) does not crash, it fails earlier:CreateDescriptorHeapreturns "E_INVALIDARG" on this GPU, so this device does not take a 2^21-slot shader-visible heap.b770d3a) merged locally with VICTORY_D3D12_DEBUG=1: still crashes, no message printed. Two reasons I can see: that PR only reads the info queue after pipeline creation, and d3d12sdklayers.dll is not installed on this machine (Graphics Tools optional feature), so the debug layer was probably not active.Not known: which instruction of the dispatch crashes; whether the shader's heap index clamp to 2^21-1 reads past the 2-slot heap on this driver (my guess, not tested); whether the debug layer would say anything (needs Graphics Tools).
Written with AI help (Claude/Kiro); the numbers are from runs on my machine.
@Creaa on GitHub · 2026-11-25 16:25 UTC · original
Found the cause, PR shortly: the test harness sets root constants as 0 values through an empty
Vec's dangling pointer, while the root signature declares one constant (user_data_dwords().max(1)); WARP ignores that, a hardware driver reads through it. Setting an empty list as one zero makes this test pass on an RTX 4070 (3 of 3, hardware and WARP), and the rest of thevictory-shadertests then run on hardware too.AI use: Claude Code (Claude Opus 5.5) drafted this.
@welisonzika14-jpg on GitHub · 2026-11-25 16:54 UTC · original
Reporter here: both fixes stop the crash on the same desktop RTX 5070 (driver 621.24), each merged alone onto
main67e8ae1.heap_direct_texture_reads_mark_their_heap_index(hardware + WARP in one run)cargo test -p victory-shader --libmain67e8ae10xc0000005)577839a8ceeb01The 3 failures left are the known NVIDIA ones from #1744:
a_heap_buffer_read_by_element_takes_the_views_strideandgathers_at_a_level_match_the_hardware(open PR #2357), anda_heap_buffer_read_where_no_buffer_view_is_reads_zeros(the view heap cap). Note: #2587 has moved todf8ee8esince I ran it; I have not rerun that head.Thanks @Creaa for finding the cause so fast.
Written with AI help (Claude/Kiro); the numbers are from runs on my machine.
@Mericas77 on GitHub · 2026-11-25 17:34 UTC · original
Same on an RTX 4070 (driver 621.01, Windows 11, rustc 1.100.0) at
main67e8ae1:emit::memory_tests::heap_direct_texture_reads_mark_their_heap_indexends the test process with0xC0000005 STATUS_ACCESS_VIOLATION, no message. It happens every time: in the full suite, with--test-threads=1, and with the test run alone. With--skipon it, the rest ofvictory-shadergives 266 passed / 3 failed (the known NVIDIA ones). I haven't tried #2587 or #2596 yet.AI-assisted.
@alonso49noob on GitHub · 2026-11-25 17:37 UTC · original
Another Blackwell data point: RTX 5060 8 GB, driver 621.01, Windows 11, Rust 1.98.1, SDK dxil.dll 10.0.26100.0.
heap_direct_texture_reads_mark_their_heap_indexcargo test -p victory-shader --libmain13f91ca0xc0000005); passes withVICTORY_WARP=1df8ee8e(current head)577839aThe 3 remaining failures are the same known NVIDIA ones:
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. This covers thedf8ee8ehead that hadn't been rerun.Written with AI help (Claude Code); the numbers are from runs on my machine.
@Marvisak on GitHub · 2026-11-25 18:45 UTC · original · edited 2026-11-26 00:50 UTC
Automated triage for the maintainers.
Confirmed on current
main(63bcca4). The fault is in how the test harness binds root constants, not in the shader change. Incrates/victory-shader/src/emit/memory_tests.rs,heap_direct_texture_reads_mark_their_heap_indexbuilds its root constants asvec[0u32; shader.user_data_dwords() as usize], which can be empty. The root signature incrates/victory-shader/src/emit/host.rsdeclaresuser_data_dwords().max(1)constants, andHost::dispatchanddrawpassRoot::Constantsthrough as given. Lines 269, 461, 597, 731 and 879 of the same file use the same pattern. The other harnesses (diff_tests.rs,flow_tests.rs,stride_tests.rs, ...) already use.max(1).The crash is now reported on RTX 5070, 5060, 4070, 4060 Laptop and the RX 6700 XT in #2547, and still on
842b0cb. WARP and Intel UHD pass because they tolerate the empty list.Open PRs, per KainanP's comparison on an RTX 4060:
Root::Constantsis bound as one zero dword indrawanddispatch. They conflict with each other, so only one can land. #2587 also addsempty_root_constants_bind_zero_in_draw_and_dispatch, a host-level test that crashes on NVIDIA onmainand passes with either fix.memory_tests.rswith.max(1). The host would still crash on the next empty list.The three NVIDIA failures that remain after the fix are tracked in #1835 and #2317.
Generated by Claude Code
@welisonzika14-jpg on GitHub · 2026-11-25 18:52 UTC · original
Small update to my table above: #2587's new head
df8ee8ealso passes here (3 of 3, RTX 5070, merged ontomain13f91ca). And #2596 + #2357 together givevictory-shader269 ok / 1 fail on this card with nothing skipped (details in #1744).Written with AI help (Claude/Kiro); the numbers are from runs on my machine.
@KainanP on GitHub · 2026-11-25 22:53 UTC · original
The #2571 PRs, measured on an RTX 4060 (where
maincrashes), plus Intel UHD and WARPSeveral open PRs touch this crash. I ran the same two checks against each of them, so they can be compared directly. No game, no game data.
Machine: Windows 11 Home 26200. DXGI adapter 0: RTX 4060 Laptop GPU (Ada, driver 32.0.16.1047). Adapter 1: Intel UHD Graphics (8086:a78b, 31.0.101.5445). Also WARP (10.0.26100.9818).
mainat13f91cae, Rust 1.98.1 as pinned. This adds a laptop Ada card to the 4070, 4070 Ti, 5060, 5070 and 5090 reports already on this issue.The two checks
emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index, run alone 3 times.emit::synthetic_tests::empty_root_constants_bind_zero_in_draw_and_dispatch. It dispatches and draws with an emptyRoot::Constantson the hardware adapter and on WARP. I cherry-picked it as a test-only patch onto the trees that lack it. It tells whether the host itself is fixed or only this one test.On
mainwith the RTX, both (t) and (h) end the process with 0xc0000005, 3 of 3 for (t). On Intel UHD both pass onmain, because that driver tolerates the empty list. On WARP both pass. So this is a crash on NVIDIA (and on the RX 6700 XT in #2547), not on every hardware driver.Per PR (RTX 4060)
"Suite" means
cargo test -p victory-shaderon the RTX. Onmain, with (t) skipped because it kills the process, the suite passes 266 and fails 3. The 3 are the known NVIDIA failures from #1744:a_heap_buffer_read_by_element_takes_the_views_stride,a_heap_buffer_read_where_no_buffer_view_is_reads_zerosandgathers_at_a_level_match_the_hardware. "Same 3" below means no new failure.13f91caemaindf8ee8ef; now8aae7ab3, same diff)Root::Constantsis set as[0]indrawanddispatch, plus test (h)577839a0)[0]in the same two arms, no testf237a3cf)memory_testscallers useuser_data_dwords().max(1), like every other harness12fdbc9e).max(1)in this one test's restructured helper541a3203)These PRs were mentioned in this context, but they do not touch this code path: #2646 (the WARP pipeline-library file, #2637) and #1940 (d16 rounding; it also conflicts with
mainnow). They only cite #2571 for the test they skipped.Intel UHD (local adapter hook; trees
main,main+#2587+#2622, andmain+#2596+#2657+(h)): (t) and (h) pass on all three. The suite fails the same 9 Intel-known tests on every tree, so neither fix adds a failure. WARP (VICTORY_WARP=1, same trees): (t) and (h) pass, and the suite fails only the 3 WARP-known tests (a_mask_joined_with_data_at_a_uniform_loop_is_its_number,gathers_at_a_level_match_the_hardware,permutes_read_the_lane_named_and_zero_from_lanes_left_out) on every tree.Semantic differences
user_data_dwords().max(1)constant thatroot_signature_fordeclares. They differ only in comment and formatting. They conflict textually, so only one of them can land. #2587 also brings (h), the only test here that exercises the host itself: it fails onmainon NVIDIA and passes with either fix.Since
mainmoved tof3578e38(74 commits, while I was testing)f3578e38, (t) still ends the process with 0xc0000005 on the RTX, 3 of 3. With (t) skipped, the suite passes 298 and fails the same 3.f3578e38+ #2596 + #2622, (t) passes 3 of 3, and the whole suite passes 301 and fails the same 3, with nothing skipped.8aae7ab3, with the same diff asdf8ee8ef), and it merges cleanly intof3578e38. So do #2739, #2668 and #2683.f3578e38+ #2596 + #2622: (t) passes. The suite fails only whatmainfails there, which now includesmain's newpermutes_mask_high_address_bits_and_divergent_branches("no pipeline for a wave of 32"; it fails onmaintoo on both).victory-gpuis not touched by any of these PRs. Onf3578e38with the RTX it fails only the 2 knownmainfailures (dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views).Recommendation
[0].Reproduce
The Intel runs used a local adapter-selection hook (
VICTORY_TEST_ADAPTER=Intel, which logs the adapter it picks). That hook is not upstream.Tested with the help of an AI assistant (Claude Code).
@pawrenity on GitHub · 2026-11-25 23:51 UTC · original
Reproduced on an NVIDIA GeForce RTX 4070, Windows 11,
main842b0cb: the test process exits0xc0000005in 3 of 3 runs alone (--test-threads=1). It passes withVICTORY_WARP=1and on this machine's AMD iGPU. These PR heads pass it here, 2 of 2 runs: #25878aae7ab3, #2596577839a0, and #2739f237a3cf(1 run). The full NVIDIA matrix is in #2317.AI-assisted (Claude Code).
@smaxxey on GitHub · 2026-11-26 09:43 UTC · original
Tested #2596 and #2668 on an RTX 4060 Laptop GPU (Ada, 8 GB, driver 32.0.16.1742), Windows 11 26300, Rust 1.98.1, Windows SDK 10.0.26100
dxil.dll. No game files. Each PR merged locally ontomain63bcca4, thencargo test -p victory-shader --lib --locked -- --test-threads=1. DXGI adapter 0 is the RTX 4060 (the Intel iGPU is adapter 1), so the hardware tests ran on the NVIDIA GPU.heap_direct_texture_reads_mark_their_heap_indexmain63bcca40xC0000005, takes the test process downmain+ #2596 (577839a)main+ #2668 (12fdbc9)The 3 failures are the same in all three runs and are already reported in #1835 / #2317:
stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride,stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros,synthetic_tests::gathers_at_a_level_match_the_hardware.Both fix the crash here. #2596 fixes it in
Hostfor every graphics and compute dispatch with empty user data; #2668 avoids it in this test only (.max(1)), alongside its EXEC guard change.Tested with Claude Code's help.
@brkunld on GitHub · 2026-11-26 13:15 UTC · original
An Ampere data point (I saw only Ada and Blackwell cards in this thread): RTX 3080 Laptop GPU, driver 32.0.16.2101, Windows 11 Home 26200, i7-11800H, Rust 1.98.1 as pinned. No game files.
heap_direct_texture_reads_mark_their_heap_indexcargo test -p victory-shader --libmain63bcca40xC0000005), alone with--exacttoomain63bcca4, this test skippeda_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)cbb9d78, this test skipped..._reads_zerosone passes)577839amerged ontomain63bcca4--exact)The crash is in the NVIDIA user-mode driver, as reported above: Application log event 1000, module
nvwgf2umx.dll32.0.16.2101, exception0xc0000005, offset0x4e63f5(the same offset in 2 of 2 crashes). No display driver reset was logged (nonvlddmkm/ event 4101).So #2596 fixes it on Ampere too. I have not tried #2587.
AI-assisted (Claude Code); the numbers are from runs on my machine.