Test a four-dword load at byte 328 of a 340-byte view on D3D12 hardware #1176
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1179"
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?
Imported from fxceless/victory-fork. Originally posted by BradRoland on 2026-11-25T22:57:03Z.
Run 277 reported black water with grouped scalar loads enabled. The README identified a specific untested hardware case: four 32-bit values loaded at byte 328 of a 340-byte raw view, with the fourth value unused by the shader. This test reproduces that instruction and binding geometry with synthetic data. Run notes
On an NVIDIA RTX 4080 (driver 621.14) and Microsoft WARP, both
VICTORY_SHADER_OPT=63and127preserved all three in-bounds values. When the shader also consumed the fourth value, it read zero at byte 340. The same backing buffer contained0x4badf00dat that location. Widening only the view to 344 bytes exposed that value, and narrowing it to 336 bytes zeroed the third and fourth values. The variant that discards the fourth load writes an independent marker to that output.All 24 dispatches returned the expected values across both adapters, optimizer settings, output variants and three view lengths. The validated shader disassembly for the three-result case showed three individual calls at 328/332/336 with optimization 63 and one four-component call at 328 with 127. The permanent fixture checks the load counts so it continues to exercise both paths.
Run
cargo test --locked -p victory-shader --lib scalar_buffer_load_at_328_respects_the_raw_view_end -- --nocapture. It runs each optimizer setting in a fresh process. LeaveVICTORY_WARPunset to try both adapters, or set0for hardware and1for WARP. The full shader library passed 217 tests with three ignored. The shader crate also passed Clippy with--all-targets --all-features -- -D warnings.The patch changes the test harness only. The result narrows the suspected driver behavior on this RTX 4080. Run 279 reports blue water and floating boats with the revised hash length and grouped loads disabled. The exact reason the grouped path produced black water in run 277 remains open. Run 279 AI-assisted implementation and testing.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.