Repository navigation
Conversation
…it declares (Marvisak#2571) The test harness declares every program's root constants with `user_data_dwords().max(1)` values, but `dispatch` passed a test's `Root::Constants(vec![])` as 0 values through the empty Vec's dangling pointer. WARP ignores that; a hardware driver reads through it, and the test process ends with 0xC0000005 (heap_direct_texture_reads_mark_their_heap_index on an RTX 5070 and an RTX 4070, and on AMD per Marvisak#2547), which also stops every later victory-shader test in that run. An empty list is now set as one zero, in the compute and the graphics path; `fuses_fmad` already did this. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fyernald
left a comment
There was a problem hiding this comment.
Reproduced #2571 and verified the fix on an RTX 3080 (617.42), Windows 10 Pro 22H2 (19045), main 67e8ae1 + #486 (needed for SM 6.6 on Windows 10):
main:cargo test -p victory-shader --lib --locked -- --test-threads=1dies after 65 tests with0xc0000005, STATUS_ACCESS_VIOLATION.- This PR: 267 passed, 3 failed. The 3 are the known #1835 ones;
heap_direct_texture_reads_mark_their_heap_indexpasses.
Setting the one declared constant is the right fix, rather than skipping the call. host.rs:162 builds the root signature with Num32BitValues: s.user_data_dwords().max(1), so there is always a constant parameter, and skipping it would leave that root argument undefined at dispatch. #2587 fixes the same crash by skipping the call; only one of the two should land.
|
Fixes it on Ampere too. RTX 3070 (driver 616.56), Windows 11, debug,
AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only. |
|
Verification of
Overlap with #2587 (same issue, #2571): the two PRs make the same code change, setting Independent verification by Claude Code (Claude Sonnet 5.5), an AI assistant, run for oni-swr. No game files, dumps, or shader names were used. |
|
RTX 4060 test (AI-assisted)
|
|
Tested on NVIDIA Ada, a different generation from the RTX 5070 in #2571: RTX 4070 Ti, driver 621.01, Windows 11 Pro build 26300, Rust 1.98.1 pinned, this PR merged onto main Plain main With this PR:
#2587 fixes the same crash on this card too (I'm commenting there separately). AI-assisted (Claude). |
… as the one constant it declares (Marvisak#2571)
|
Automated triage for the maintainers. Merge candidate. This fixes #2571, a test-harness crash on hardware adapters. In Overlap: #2587 makes the same code change and adds a regression test, but it currently conflicts with CI: Generated by Claude Code |
|
Measured against the other #2571 PRs on an RTX 4060, Intel UHD and WARP. This one fixes the crash with no regressions, but it is the same code as #2587, which also has a host-level test, so the comparison suggests one of the two: #2571 (comment) (AI-assisted) |
Dukestar69
left a comment
There was a problem hiding this comment.
Tested merged onto origin/main (63bcca4) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP, dxil.dll validator active):
- Reproduced the crash on
origin/main(63bcca4):emit::memory_tests::heap_direct_texture_reads_mark_their_heap_indexexits with0xc0000005(STATUS_ACCESS_VIOLATION) on RTX 5090 hardware. - With
#2596merged:cargo test -p victory-shader --lib emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index: 1 passed, 0 failed on both RTX 5090 hardware and WARP (0.35 s). cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Passing &[0] when Root::Constants is empty matches the root signature's user_data_dwords().max(1) declaration and eliminates the dangling-pointer read in both draw and dispatch.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
…it declares (Marvisak#2571) The test harness declares every program's root constants with `user_data_dwords().max(1)` values, but `dispatch` passed a test's `Root::Constants(vec![])` as 0 values through the empty Vec's dangling pointer. WARP ignores that; a hardware driver reads through it, and the test process ends with 0xC0000005 (heap_direct_texture_reads_mark_their_heap_index on an RTX 5070 and an RTX 4070, and on AMD per Marvisak#2547), which also stops every later victory-shader test in that run. An empty list is now set as one zero, in the compute and the graphics path; `fuses_fmad` already did this. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 577839a) Upstream-PR: Marvisak#2596
fuzeofficlal
left a comment
There was a problem hiding this comment.
Verified 577839a0c3b85fa5e69f7059b63d9192a6952beb cleanly merged onto main (63bcca43) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP):
- Fixes the #2571 RTX 5090 crash: on pristine
63bcca43,emit::memory_tests::heap_direct_texture_reads_mark_their_heap_indexaborts with0xc0000005(STATUS_ACCESS_VIOLATION). With this PR merged, it passes cleanly on RTX 5090 (0.39s), and all 5emit::memory_tests::tests pass on both RTX 5090 (1.63s) and WARP (0.33s). - Site coverage:
crates/victory-shader/src/emit/host.rs:1164-1165(draw/DispatchMesh/DrawInstanced) and1929-1930(dispatch) now matchroot_signature_for'suser_data_dwords().max(1)(host.rs:229), andfuses_fmad(host.rs:610, 696-701) already writes the declared count. cargo test -p xtask --locked policy::tests::repository_passes_policy:1 passed(asset policy: 191 files ok);cargo clippy --locked -p victory-shader --all-targets -- -D warnings(default and--all-features): clean.
Note: overlaps with #2587 on emit/host.rs for #2571 (this PR is the minimal fix without an extra test). Ready to merge.
heap_direct_texture_reads_mark_their_heap_indexkilled thevictory-shadertest process on hardware GPUs because the test harness set root constants as 0 values through an emptyVec's dangling pointer, while the root signature it builds declares at least one constant (user_data_dwords().max(1)). WARP ignores the 0-value call; the hardware driver reads through the pointer and the process ends with 0xC0000005. An empty constant list is now set as the one zero constant the signature declares. Fixes #2571.What is in it
crates/victory-shader/src/emit/host.rs: indispatch(compute) and the graphics dispatch,Root::Constantswith no values is set as[0].fuses_fmadalready sized its constants withmax(1).Tested
main67e8ae1.cargo test -p victory-shader --lib --locked heap_direct_texture_reads_mark_their_heap_index: onmain0xC0000005 in every run, in the hardware pass's dispatch (the pipeline is built; the warp pass is never reached); with this change 3 of 3 runs pass, hardware and WARP.cargo test --workspace --locked --no-fail-fast: onmain507 passed, 2 failed, 6 ignored, and thevictory-shadertest binary ends with 0xC0000005, so none of its results are counted; with this change 774 passed, 5 failed, 9 ignored. The 5 fail the same way onmain(940d32f, when the shader binary still ran) and are outside this change:dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views,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(the five in Test report: RTX 5070 (Blackwell), Windows 11, 70564ae: 471 passed, 5 failed, 7 ignored (4 from the 1,000,000 view heap cap) #1744).cargo clippy --workspace --all-targets --locked -- -D warnings: clean.cargo xtask policy: 184 files ok.Not tested
AI use
🤖 Generated with Claude Code