Shader: preserve the sign in bit-field extraction #13
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!13
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/13/head"
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?
@Ingenioeren on GitHub · 2026-11-23 22:59 UTC · original
Ingenioeren:victory-agent/signed-bfe→main· +32 −3 · 2 files · 1 commits · closed without mergingWhat
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.
@Marvisak on GitHub · 2026-11-23 23:14 UTC · original
Already fixed, thanks anyways
Pull request closed