Repository navigation
Shaders: validate raw fixtures and signed MAD64 with full-word regression - #2774
LogicGrove wants to merge 3 commits into
Conversation
Reuse LICObr's correction from upstream PR Marvisak#2357, head dd25e37.
Reuse BastienRodz's correction and original regression from upstream PR Marvisak#2254, head 5a8a792.
|
Independent verification of head
Method: WARP/CPU only (no physical GPU; AI-assisted review (Claude Code / Claude Sonnet 5.5). |
|
Reviewed and verified
|
|
Correct: v_mad_i64_i32's name doesn't match the _i64 suffix check so its S2 literal was zero-extended - the explicit-name addition matches LLVM's operand rules (S2.i64 sign-extends). The test splits the cases well (mad_i64 sign-extends -100, mad_u64 zero-extends). Raw-stride fixture changes also fix the tests to match how the host actually views heap buffers. |
|
Automated triage for the maintainers. This PR re-packages changes from other PRs: the This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the Generated by Claude Code |
Summary
On RTX 2060, the existing stride/gather fixtures fail because they bind structured views for raw loads. Separately, a negative literal in
v_mad_i64_i32loses its sign. This integrates the small corrections from #2357 (LICObr) and #2254 (BastienRodz), preserving their authors in separate commits, and adds an independent CPU-oracle regression covering both result words.Our additional test covers six dynamic input pairs, three literal bit patterns, signed/unsigned variants, and both 32-bit words: 72 word comparisons per backend. No game files, extracted shaders, console SDK, or proprietary fixtures were used. This changes neither heap limits nor carry-out handling.
This is an integration/validation PR, not a claim to have authored the existing fixes. If the original PRs are preferred, the final commit can be cherry-picked onto #2254 independently.
Evidence
Windows 11 Home build 26200, RTX 2060 6 GB, NVIDIA driver 610.88, Rust 1.98.1 MSVC. Base:
13f91ca.After Shader tests: heap buffer views are raw, as the host makes them #2357 alone:
a_heap_buffer_read_by_element_takes_the_views_strideandgathers_at_a_level_match_the_hardwarepass. The two GPU heap tests and the null-buffer-view shader test still fail.mad_literal_addends_match_cpu_in_both_wordsfail on hardware: the high word of0 * 0 - 100is0, expected0xffffffff.After: both regressions pass in debug and release. The fixture corrections also pass targeted release runs. The shader harness loops over hardware and WARP; no backend-skipped messages appeared in these successful targeted runs.
cargo clippy -p victory-shader --all-targets --locked -- -D warnings: pass.cargo xtask policy: pass.git diff --check: pass. Added regression formatted with rustfmt.Full workspace run completed (exit 101): victory-gpu: 193 passed, 2 failed, 1 ignored; victory-shader: 271 passed, 1 failed, 3 ignored. Remaining failures: descriptor::host::tests::dynamic_slots_are_held_until_released; memory::tests::lists_share_a_table_and_copies_keep_their_views; emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros. All three were reproduced before this PR. No additional failure names appeared.
The local full-workspace run also includes the previously validated loader tests/reference fix from #2418, which are not included in this shader-only PR. The four shader files in this PR match those tested locally. No FPS or game-playability claim is made.
AI use: Codex assisted with independent reproduction, the additional CPU-oracle test, validation, and this description. Reused changes are credited above.
Merge Danger
Door: Two-way; revert the commits to restore prior behavior.
Blast Radius: Shaders. The production change affects signed MAD literal extension; other changes are synthetic test fixtures and regression coverage. The remaining NVIDIA heap failures are not fixed here.