Repository navigation
Conversation
…MDMA, fixes WARP device removal)
WARP test report: head
|
Dukestar69
left a comment
There was a problem hiding this comment.
Verified on RTX 5090 & WARP against origin/main (63bcca4):
cargo test -p victory-shader --lib atomic -- --test-threads=1: passed on RTX 5090 and WARP.cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Bit-identical two's-complement lowering (atomicrmw add (0 - v0)) that avoids WARP device removal on atomicrmw sub.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
atomicrmw subremoves the WARP device when the LDS subtract atomic is used; lowering it as an add of the wrapping negation is bit-identical and does not.What changes
bitcode.rs:Rmw::Subkeeps its index for LLVM table alignment but is no longer constructed; the comment records why.lower.rs:sub_u32maps toRmw::Add, and the operand is pre-negated with the existingBin::Subagainsti32(0).Why not fix WARP instead
The shader validates and hardware is exact. The device removal is in the D3D12 WARP path for
atomicrmw sub— not something this tree controls.Verification
cargo check -p victory-shader --libclean on63bcca4. I also have a hardware test (a subtract atomic over a per-thread 16-byte slice, readback compared against the wrapping negation) on my test branch; it is not in this PR becauselds_tests.rsno longer exists onmain. Happy to re-home it intomemory_tests.rsif you want it here.Ported from my test branch (commit
cf99d62).