Repository navigation
Tests: bind a constant where a shader has no user data - #2739
Therecalloftheonion wants to merge 1 commit into
Conversation
The host root signature always declares one 32-bit constant (Num32BitValues.max(1)), but four memory tests sized their user data from user_data_dwords() and could pass a count of 0 to SetComputeRoot32BitConstants. On the RX 6700 XT the driver access-violates on that call (WARP tolerates it), killing the shader test process; the other shader tests already use max(1). Memory tests now do the same.
|
Correct: user_data_dwords()==0 would panic on ud[u.index] in the loop or pass an empty slice to dispatch; .max(1) keeps both paths safe without changing semantics for shaders that do have user data. |
|
Verified
|
|
RDNA3 data point for
So the abort looks specific to RDNA2 (or its driver). The |
|
Measured in the #2571 comparison: it fixes the 4 |
|
Automated triage for the maintainers. The change is harmless and matches how the root signature is declared ( What would change the verdict: either rebase and cover all remaining callers, or a maintainer decides to take #2587 instead, in which case this PR is not needed. CI ( Generated by Claude Code |
What
The host root signature always declares at least one 32-bit constant (
Num32BitValues.max(1)), but four memory tests sized their constant array fromuser_data_dwords()and could pass a count of 0 toSetComputeRoot32BitConstants.Why
On the RX 6700 XT,
SetComputeRoot32BitConstants(..., 0, ...)access-violates and aborts the test process; WARP tolerates it. That made the wholevictory-shadersuite unusable on this GPU (heap_direct_texture_reads_mark_their_heap_indexdied withSTATUS_ACCESS_VIOLATION). Every other shader test already uses.max(1).Testing
cargo test -p victory-shader --lib: 268 passed; the suite no longer aborts. Two pre-existing hardware assertions remain on this GPU (stride_tests::a_heap_buffer_read_by_element...andsynthetic_tests::gathers_at_a_level_match_the_hardware), outside this change.