Shader: preserve the sign in bit-field extraction #13
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13"
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 Marvisak/VIctory. Originally posted by Ingenioeren on 2026-11-23T22:59:32Z.
What
Address the signed bit-field extraction case from #2. Use an arithmetic right shift for signed scalar and vector BFE so a field crossing bit 31 keeps the source sign. Unsigned extraction keeps its logical shift.
Tested
The new synthetic regression failed against the original lowering (LShr instead of AShr). It checks the emitted signed and unsigned shift opcodes. Ran cargo test --locked --offline -p victory-shader --lib -- --nocapture on Windows x64 with Rust 1.98.1. Compiler-dependent differential tests returned early because the required shader compilers were unavailable. This does not claim an RDNA2 hardware reproduction.
AI assistance: Codex prepared the change and regression test and verified the results. No game assets were used.
Windows shader crate tests: 58 passed; 0 failed; 0 ignored.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-23T23:14:14Z.
Already fixed, thanks anyways
Pull request closed