Shader tests: heap_direct_texture_reads_mark_their_heap_index kills the test process on a real GPU (RTX 5070, main 67e8ae1) #2571

Open
opened 2026-11-26 05:09:31 +00:00 by github-bot · 11 comments
Owner

@⁠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 (da82e44 is in its history).

The test emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index loops 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.

  • Hardware (RTX 5070), no env var: 3 of 3 runs abort with exit code 0xc0000005 (STATUS_ACCESS_VIOLATION). There is no panic message, the test process just dies, so the "warp" pass is never reached.
  • VICTORY_WARP=1 (both passes use WARP): 3 of 3 runs pass.
  • CI is green again at 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) and 67e8ae1, running the test on hardware (81 commits): the first bad commit is 2d6c0df "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). With VICTORY_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.

**@⁠welisonzika14-jpg** on GitHub · 2026-11-25 16:03 UTC · [original](https://github.com/Marvisak/VIctory/issues/2571) Machine: RTX 5070, driver 621.24, Windows 11, Rust 1.98.1 (MSVC). Head tested: origin/main 67e8ae1 (da82e44 is in its history). The test `emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index` loops 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`. - Hardware (RTX 5070), no env var: 3 of 3 runs abort with exit code 0xc0000005 (STATUS_ACCESS_VIOLATION). There is no panic message, the test process just dies, so the "warp" pass is never reached. - `VICTORY_WARP=1` (both passes use WARP): 3 of 3 runs pass. - CI is green again at 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) and 67e8ae1, running the test on hardware (81 commits): the first bad commit is 2d6c0df "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). With `VICTORY_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 locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:09:31 +00:00
Author
Owner

@⁠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:

  • The crash is inside the NVIDIA user-mode driver module. Windows Application log (event 1000), 3 crashes, same each time: module nvwgf2umx.dll 32.0.16.2124, exception 0xc0000005, offset 0x4f0f85. There is no Rust backtrace because it is an access violation.
  • It happens in Host::dispatch, after compute_pipeline returned OK (I put eprintln markers around the two calls, local only, reverted).
  • The UAV size is not the cause: with the UAV cut to 64 words it still crashes.
  • The test uses a 2-slot view heap (two 1x1 textures), no View::NullBuffers. Adding View::NullBuffers (heap of 2^21 slots) does not crash, it fails earlier: CreateDescriptorHeap returns "E_INVALIDARG" on this GPU, so this device does not take a 2^21-slot shader-visible heap.
  • PR #1943 merged locally (840af7f): still crashes (0xc0000005). PR #2322 merged locally (382e043): still crashes.
  • PR #2568 (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.
  • WARP passes (as already reported).

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.

**@⁠welisonzika14-jpg** on GitHub · 2026-11-25 16:22 UTC · [original](https://github.com/Marvisak/VIctory/issues/2571#issuecomment-7167863696) 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: - The crash is inside the NVIDIA user-mode driver module. Windows Application log (event 1000), 3 crashes, same each time: module nvwgf2umx.dll 32.0.16.2124, exception 0xc0000005, offset 0x4f0f85. There is no Rust backtrace because it is an access violation. - It happens in `Host::dispatch`, after `compute_pipeline` returned OK (I put eprintln markers around the two calls, local only, reverted). - The UAV size is not the cause: with the UAV cut to 64 words it still crashes. - The test uses a 2-slot view heap (two 1x1 textures), no `View::NullBuffers`. Adding `View::NullBuffers` (heap of 2^21 slots) does not crash, it fails earlier: `CreateDescriptorHeap` returns "E_INVALIDARG" on this GPU, so this device does not take a 2^21-slot shader-visible heap. - PR #1943 merged locally (840af7f): still crashes (0xc0000005). PR #2322 merged locally (382e043): still crashes. - PR #2568 (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. - WARP passes (as already reported). 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.
Author
Owner

@⁠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 the victory-shader tests then run on hardware too.

AI use: Claude Code (Claude Opus 5.5) drafted this.

**@⁠Creaa** on GitHub · 2026-11-25 16:25 UTC · [original](https://github.com/Marvisak/VIctory/issues/2571#issuecomment-7167962351) 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 the `victory-shader` tests then run on hardware too. AI use: Claude Code (Claude Opus 5.5) drafted this.
Author
Owner

@⁠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 main 67e8ae1.

tree heap_direct_texture_reads_mark_their_heap_index (hardware + WARP in one run) cargo test -p victory-shader --lib
main 67e8ae1 3 of 3 kill the process (0xc0000005) aborts at this test
#2596 577839a 3 of 3 pass 267 ok, 3 fail
#2587 8ceeb01 3 of 3 pass 268 ok, 3 fail

The 3 failures left are the known NVIDIA ones from #1744: a_heap_buffer_read_by_element_takes_the_views_stride and gathers_at_a_level_match_the_hardware (open PR #2357), and a_heap_buffer_read_where_no_buffer_view_is_reads_zeros (the view heap cap). Note: #2587 has moved to df8ee8e since 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.

**@⁠welisonzika14-jpg** on GitHub · 2026-11-25 16:54 UTC · [original](https://github.com/Marvisak/VIctory/issues/2571#issuecomment-7168723311) Reporter here: both fixes stop the crash on the same desktop RTX 5070 (driver 621.24), each merged alone onto `main` `67e8ae1`. | tree | `heap_direct_texture_reads_mark_their_heap_index` (hardware + WARP in one run) | `cargo test -p victory-shader --lib` | |---|---|---| | `main` `67e8ae1` | 3 of 3 kill the process (`0xc0000005`) | aborts at this test | | #2596 `577839a` | **3 of 3 pass** | 267 ok, 3 fail | | #2587 `8ceeb01` | **3 of 3 pass** | 268 ok, 3 fail | The 3 failures left are the known NVIDIA ones from #1744: `a_heap_buffer_read_by_element_takes_the_views_stride` and `gathers_at_a_level_match_the_hardware` (open PR #2357), and `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros` (the view heap cap). Note: #2587 has moved to `df8ee8e` since 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.
Author
Owner

@⁠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 main 67e8ae1: emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index ends the test process with 0xC0000005 STATUS_ACCESS_VIOLATION, no message. It happens every time: in the full suite, with --test-threads=1, and with the test run alone. With --skip on it, the rest of victory-shader gives 266 passed / 3 failed (the known NVIDIA ones). I haven't tried #2587 or #2596 yet.

AI-assisted.

**@⁠Mericas77** on GitHub · 2026-11-25 17:34 UTC · [original](https://github.com/Marvisak/VIctory/issues/2571#issuecomment-7169706769) Same on an RTX 4070 (driver 621.01, Windows 11, rustc 1.100.0) at `main` `67e8ae1`: `emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index` ends the test process with `0xC0000005 STATUS_ACCESS_VIOLATION`, no message. It happens every time: in the full suite, with `--test-threads=1`, and with the test run alone. With `--skip` on it, the rest of `victory-shader` gives 266 passed / 3 failed (the known NVIDIA ones). I haven't tried #2587 or #2596 yet. AI-assisted.
Author
Owner

@⁠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.

tree heap_direct_texture_reads_mark_their_heap_index cargo test -p victory-shader --lib
main 13f91ca 3 of 3 kill the process (0xc0000005); passes with VICTORY_WARP=1 aborts at this test
#2587 df8ee8e (current head) 3 of 3 pass 268 ok, 3 fail
#2596 577839a 3 of 3 pass 267 ok, 3 fail

The 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 the df8ee8e head that hadn't been rerun.

Written with AI help (Claude Code); the numbers are from runs on my machine.

**@⁠alonso49noob** on GitHub · 2026-11-25 17:37 UTC · [original](https://github.com/Marvisak/VIctory/issues/2571#issuecomment-7169766234) Another Blackwell data point: RTX 5060 8 GB, driver 621.01, Windows 11, Rust 1.98.1, SDK dxil.dll 10.0.26100.0. | tree | `heap_direct_texture_reads_mark_their_heap_index` | `cargo test -p victory-shader --lib` | |---|---|---| | `main` `13f91ca` | 3 of 3 kill the process (`0xc0000005`); passes with `VICTORY_WARP=1` | aborts at this test | | #2587 `df8ee8e` (current head) | **3 of 3 pass** | 268 ok, 3 fail | | #2596 `577839a` | **3 of 3 pass** | 267 ok, 3 fail | The 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 the `df8ee8e` head that hadn't been rerun. Written with AI help (Claude Code); the numbers are from runs on my machine.
Author
Owner

@⁠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. In crates/victory-shader/src/emit/memory_tests.rs, heap_direct_texture_reads_mark_their_heap_index builds its root constants as vec[0u32; shader.user_data_dwords() as usize], which can be empty. The root signature in crates/victory-shader/src/emit/host.rs declares user_data_dwords().max(1) constants, and Host::dispatch and draw pass Root::Constants through 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:

  • #2596 (merge candidate) and #2587 (needs a rebase) are the same host-side fix: an empty Root::Constants is bound as one zero dword in draw and dispatch. They conflict with each other, so only one can land. #2587 also adds empty_root_constants_bind_zero_in_draw_and_dispatch, a host-level test that crashes on NVIDIA on main and passes with either fix.
  • #2739 (needs work) fixes only the callers in memory_tests.rs with .max(1). The host would still crash on the next empty list.
  • #2668 and #2683 address other bugs and don't fix this one (#2683's heap clamp leaves the crash in place).

The three NVIDIA failures that remain after the fix are tracked in #1835 and #2317.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 18:45 UTC · [original](https://github.com/Marvisak/VIctory/issues/2571#issuecomment-7171349433) · edited 2026-11-26 00:50 UTC <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-25T23:51:27Z at=2026-11-26T00:52:00Z --> 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. In `crates/victory-shader/src/emit/memory_tests.rs`, `heap_direct_texture_reads_mark_their_heap_index` builds its root constants as `vec[0u32; shader.user_data_dwords() as usize]`, which can be empty. The root signature in `crates/victory-shader/src/emit/host.rs` declares `user_data_dwords().max(1)` constants, and `Host::dispatch` and `draw` pass `Root::Constants` through 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: - **#2596** (merge candidate) and **#2587** (needs a rebase) are the same host-side fix: an empty `Root::Constants` is bound as one zero dword in `draw` and `dispatch`. They conflict with each other, so only one can land. #2587 also adds `empty_root_constants_bind_zero_in_draw_and_dispatch`, a host-level test that crashes on NVIDIA on `main` and passes with either fix. - #2739 (needs work) fixes only the callers in `memory_tests.rs` with `.max(1)`. The host would still crash on the next empty list. - #2668 and #2683 address other bugs and don't fix this one (#2683's heap clamp leaves the crash in place). The three NVIDIA failures that remain after the fix are tracked in #1835 and #2317. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠welisonzika14-jpg on GitHub · 2026-11-25 18:52 UTC · original

Small update to my table above: #2587's new head df8ee8e also passes here (3 of 3, RTX 5070, merged onto main 13f91ca). And #2596 + #2357 together give victory-shader 269 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.

**@⁠welisonzika14-jpg** on GitHub · 2026-11-25 18:52 UTC · [original](https://github.com/Marvisak/VIctory/issues/2571#issuecomment-7171527059) Small update to my table above: #2587's new head `df8ee8e` also passes here (3 of 3, RTX 5070, merged onto `main` `13f91ca`). And #2596 + #2357 together give `victory-shader` 269 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.
Author
Owner

@⁠KainanP on GitHub · 2026-11-25 22:53 UTC · original

The #2571 PRs, measured on an RTX 4060 (where main crashes), plus Intel UHD and WARP

Several 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). main at 13f91cae, 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

  • (t) The test from this issue, emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index, run alone 3 times.
  • (h) #2587's host-level test, emit::synthetic_tests::empty_root_constants_bind_zero_in_draw_and_dispatch. It dispatches and draws with an empty Root::Constants on 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 main with the RTX, both (t) and (h) end the process with 0xc0000005, 3 of 3 for (t). On Intel UHD both pass on main, 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-shader on the RTX. On main, 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_zeros and gathers_at_a_level_match_the_hardware. "Same 3" below means no new failure.

PR (head) merges onto 13f91cae what it changes (t) x3 (h) suite
main 0xc0000005 x3 0xc0000005 266 / 3 (with (t) skipped)
#2587 (df8ee8ef; now 8aae7ab3, same diff) clean; conflicts with #2596 host: an empty Root::Constants is set as [0] in draw and dispatch, plus test (h) pass x3 pass 268 / same 3, nothing skipped
#2596 (577839a0) clean; conflicts with #2587 host: the same [0] in the same two arms, no test pass x3 pass 268 / same 3, nothing skipped
#2739 (f237a3cf) clean tests: the 4 memory_tests callers use user_data_dwords().max(1), like every other harness pass x3 0xc0000005 (the host still passes an empty list through) 267 / same 3, with (h) skipped
#2668 (12fdbc9e) clean an EXEC guard on heap-direct read marks (a different bug), and .max(1) in this one test's restructured helper pass x3 0xc0000005 269 / same 3 (+2 own tests), with (h) skipped
#2683 (541a3203) clean clamps heap indices to 1,000,000 (the "reads past the heap" guess in this thread) 0xc0000005 x3 0xc0000005 not run

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 main now). They only cite #2571 for the test they skipped.

Intel UHD (local adapter hook; trees main, main+#2587+#2622, and main+#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

  • #2587 and #2596 are the same fix. Both bind one zero dword when the list is empty, which matches the user_data_dwords().max(1) constant that root_signature_for declares. 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 on main on NVIDIA and passes with either fix.
  • #2739 fixes the callers, not the host. It is consistent with the other harnesses, and it merges cleanly with either host fix. On its own, though, the next test that passes an empty list will crash NVIDIA again, as (h) shows.
  • #2668 is about something else: an inactive lane should not set read marks. It avoids this crash only inside the one test it rewrites. It is independent and merges cleanly with #2587, #2596 and #2739.
  • #2683 does not touch the root constants. The crash stays, which supports the cause found in the thread (the empty constant list), not the heap clamp.

Since main moved to f3578e38 (74 commits, while I was testing)

  • On 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.
  • #2596 still merges cleanly. On f3578e38 + #2596 + #2622, (t) passes 3 of 3, and the whole suite passes 301 and fails the same 3, with nothing skipped.
  • #2587 has since been rebased (8aae7ab3, with the same diff as df8ee8ef), and it merges cleanly into f3578e38. So do #2739, #2668 and #2683.
  • Intel UHD and WARP on f3578e38 + #2596 + #2622: (t) passes. The suite fails only what main fails there, which now includes main's new permutes_mask_high_address_bits_and_divergent_branches ("no pipeline for a wave of 32"; it fails on main too on both).
  • victory-gpu is not touched by any of these PRs. On f3578e38 with the RTX it fails only the 2 known main failures (dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views).

Recommendation

  • Merge #2587. It is the host fix and the regression test (h) in one, and its rebased head merges cleanly. Then close #2596 as a duplicate of the same code (no criticism of it: it was first and identical).
  • Optionally #2739 as well, for consistency of the test harnesses. It is not needed once the host binds [0].
  • #2668 and #2683 should be judged on their own bugs. They are not alternatives for this one.

Reproduce

# (t), on main and on each PR
cargo test -p victory-shader --lib -- --exact emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --nocapture
# (h): #2587's test; onto other trees: git diff origin/main...pr/2587 -- crates/victory-shader/src/emit/synthetic_tests.rs | git apply
cargo test -p victory-shader --lib -- --exact emit::synthetic_tests::empty_root_constants_bind_zero_in_draw_and_dispatch --nocapture
cargo test -p victory-shader --no-fail-fast
VICTORY_WARP=1 cargo test -p victory-shader --no-fail-fast

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).

**@⁠KainanP** on GitHub · 2026-11-25 22:53 UTC · [original](https://github.com/Marvisak/VIctory/issues/2571#issuecomment-7176908308) ## The #2571 PRs, measured on an RTX 4060 (where `main` crashes), plus Intel UHD and WARP Several 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). `main` at `13f91cae`, 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 - **(t)** The test from this issue, `emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index`, run alone 3 times. - **(h)** #2587's host-level test, `emit::synthetic_tests::empty_root_constants_bind_zero_in_draw_and_dispatch`. It dispatches and draws with an empty `Root::Constants` on 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 `main` with the RTX, **both (t) and (h) end the process with 0xc0000005**, 3 of 3 for (t). On Intel UHD both **pass** on `main`, 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-shader` on the RTX. On `main`, 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_zeros` and `gathers_at_a_level_match_the_hardware`. "Same 3" below means no new failure. | PR (head) | merges onto `13f91cae` | what it changes | (t) x3 | (h) | suite | |---|---|---|---|---|---| | `main` | | | **0xc0000005** x3 | **0xc0000005** | 266 / 3 (with (t) skipped) | | **#2587** (`df8ee8ef`; now `8aae7ab3`, same diff) | clean; **conflicts with #2596** | host: an empty `Root::Constants` is set as `[0]` in `draw` and `dispatch`, plus test (h) | pass x3 | pass | 268 / same 3, nothing skipped | | **#2596** (`577839a0`) | clean; conflicts with #2587 | host: the same `[0]` in the same two arms, no test | pass x3 | pass | 268 / same 3, nothing skipped | | #2739 (`f237a3cf`) | clean | tests: the 4 `memory_tests` callers use `user_data_dwords().max(1)`, like every other harness | pass x3 | **0xc0000005** (the host still passes an empty list through) | 267 / same 3, with (h) skipped | | #2668 (`12fdbc9e`) | clean | an EXEC guard on heap-direct read marks (a different bug), and `.max(1)` in this one test's restructured helper | pass x3 | **0xc0000005** | 269 / same 3 (+2 own tests), with (h) skipped | | #2683 (`541a3203`) | clean | clamps heap indices to 1,000,000 (the "reads past the heap" guess in this thread) | **0xc0000005** x3 | **0xc0000005** | not run | 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 `main` now). They only cite #2571 for the test they skipped. **Intel UHD** (local adapter hook; trees `main`, `main`+#2587+#2622, and `main`+#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 - **#2587 and #2596 are the same fix.** Both bind one zero dword when the list is empty, which matches the `user_data_dwords().max(1)` constant that `root_signature_for` declares. 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 on `main` on NVIDIA and passes with either fix. - **#2739 fixes the callers, not the host.** It is consistent with the other harnesses, and it merges cleanly with either host fix. On its own, though, the next test that passes an empty list will crash NVIDIA again, as (h) shows. - **#2668** is about something else: an inactive lane should not set read marks. It avoids this crash only inside the one test it rewrites. It is independent and merges cleanly with #2587, #2596 and #2739. - **#2683** does not touch the root constants. The crash stays, which supports the cause found in the thread (the empty constant list), not the heap clamp. ### Since `main` moved to `f3578e38` (74 commits, while I was testing) - On `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. - **#2596 still merges cleanly.** On `f3578e38` + #2596 + #2622, (t) passes 3 of 3, and the whole suite passes 301 and fails the same 3, with nothing skipped. - #2587 has since been rebased (`8aae7ab3`, with the same diff as `df8ee8ef`), and it merges cleanly into `f3578e38`. So do #2739, #2668 and #2683. - Intel UHD and WARP on `f3578e38` + #2596 + #2622: (t) passes. The suite fails only what `main` fails there, which now includes `main`'s new `permutes_mask_high_address_bits_and_divergent_branches` ("no pipeline for a wave of 32"; it fails on `main` too on both). - `victory-gpu` is not touched by any of these PRs. On `f3578e38` with the RTX it fails only the 2 known `main` failures (`dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`). ### Recommendation - **Merge #2587.** It is the host fix and the regression test (h) in one, and its rebased head merges cleanly. Then close #2596 as a duplicate of the same code (no criticism of it: it was first and identical). - Optionally **#2739** as well, for consistency of the test harnesses. It is not needed once the host binds `[0]`. - #2668 and #2683 should be judged on their own bugs. They are not alternatives for this one. ### Reproduce ```sh # (t), on main and on each PR cargo test -p victory-shader --lib -- --exact emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --nocapture # (h): #2587's test; onto other trees: git diff origin/main...pr/2587 -- crates/victory-shader/src/emit/synthetic_tests.rs | git apply cargo test -p victory-shader --lib -- --exact emit::synthetic_tests::empty_root_constants_bind_zero_in_draw_and_dispatch --nocapture cargo test -p victory-shader --no-fail-fast VICTORY_WARP=1 cargo test -p victory-shader --no-fail-fast ``` 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).
Author
Owner

@⁠pawrenity on GitHub · 2026-11-25 23:51 UTC · original

Reproduced on an NVIDIA GeForce RTX 4070, Windows 11, main 842b0cb: the test process exits 0xc0000005 in 3 of 3 runs alone (--test-threads=1). It passes with VICTORY_WARP=1 and on this machine's AMD iGPU. These PR heads pass it here, 2 of 2 runs: #2587 8aae7ab3, #2596 577839a0, and #2739 f237a3cf (1 run). The full NVIDIA matrix is in #2317.

AI-assisted (Claude Code).

**@⁠pawrenity** on GitHub · 2026-11-25 23:51 UTC · [original](https://github.com/Marvisak/VIctory/issues/2571#issuecomment-7178138539) Reproduced on an NVIDIA GeForce RTX 4070, Windows 11, `main` 842b0cb: the test process exits `0xc0000005` in 3 of 3 runs alone (`--test-threads=1`). It passes with `VICTORY_WARP=1` and on this machine's AMD iGPU. These PR heads pass it here, 2 of 2 runs: #2587 `8aae7ab3`, #2596 `577839a0`, and #2739 `f237a3cf` (1 run). The full NVIDIA matrix is in #2317. AI-assisted (Claude Code).
Author
Owner

@⁠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 onto main 63bcca4, then cargo 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_index suite
main 63bcca4 0xC0000005, takes the test process down 298 passed, 3 failed (crashing test skipped)
main + #2596 (577839a) ok 299 passed, 3 failed
main + #2668 (12fdbc9) ok, its two new tests ok too 301 passed, 3 failed

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 Host for 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.

**@⁠smaxxey** on GitHub · 2026-11-26 09:43 UTC · [original](https://github.com/Marvisak/VIctory/issues/2571#issuecomment-7188386304) 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 onto `main` 63bcca4, then `cargo 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_index` | suite | |---|---|---| | `main` 63bcca4 | `0xC0000005`, takes the test process down | 298 passed, 3 failed (crashing test skipped) | | `main` + #2596 (`577839a`) | ok | 299 passed, 3 failed | | `main` + #2668 (`12fdbc9`) | ok, its two new tests ok too | 301 passed, 3 failed | 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 `Host` for 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.
Author
Owner

@⁠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.

tree heap_direct_texture_reads_mark_their_heap_index cargo test -p victory-shader --lib
main 63bcca4 kills the process (0xC0000005), alone with --exact too aborts at this test
main 63bcca4, this test skipped – 298 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)
#1777 cbb9d78, this test skipped – 299 passed, 2 failed (the ..._reads_zeros one passes)
#2596 577839a merged onto main 63bcca4 3 of 3 pass (--exact) 299 passed, 3 failed, nothing skipped, no abort (the same 3 known NVIDIA failures)

The crash is in the NVIDIA user-mode driver, as reported above: Application log event 1000, module nvwgf2umx.dll 32.0.16.2101, exception 0xc0000005, offset 0x4e63f5 (the same offset in 2 of 2 crashes). No display driver reset was logged (no nvlddmkm / 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.

**@⁠brkunld** on GitHub · 2026-11-26 13:15 UTC · [original](https://github.com/Marvisak/VIctory/issues/2571#issuecomment-7193083706) 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. | tree | `heap_direct_texture_reads_mark_their_heap_index` | `cargo test -p victory-shader --lib` | |---|---|---| | `main` `63bcca4` | kills the process (`0xC0000005`), alone with `--exact` too | aborts at this test | | `main` `63bcca4`, this test skipped | – | 298 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`) | | #1777 `cbb9d78`, this test skipped | – | 299 passed, 2 failed (the `..._reads_zeros` one passes) | | #2596 `577839a` merged onto `main` `63bcca4` | **3 of 3 pass** (`--exact`) | **299 passed, 3 failed**, nothing skipped, no abort (the same 3 known NVIDIA failures) | The crash is in the NVIDIA user-mode driver, as reported above: Application log event 1000, module `nvwgf2umx.dll` 32.0.16.2101, exception `0xc0000005`, offset `0x4e63f5` (the same offset in 2 of 2 crashes). No display driver reset was logged (no `nvlddmkm` / 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.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#2571
No description provided.