Support absolute-value operands in pixel shader translation #89
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!89
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/89/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?
@RonLogic on GitHub · 2026-11-21 15:48 UTC · original
RonLogic:shader-abs-operand→main· +54 −8 · 4 files · 5 commits · merged 2026-11-21 16:54 UTCSummary
The pixel shader lowerer rejected the AMDGPU absolute-value source modifier on an otherwise supported floating-point instruction. This change translates both
|v12|andabs(v12)to HLSLabsand reuses the existing operand validation.The synthetic fixture computes
abs(0.5 - red)from a sampled texture. The reference covers inputs on both sides of 0.5. The renderer reports a pixel mismatch when the modifier is removed from the fixture. The new fixture also runs through the existing LLVM 15 assembly and disassembly test in CI.Verification
Both tests passed on Windows with an RTX 4070 (driver
32.0.16.2124) and Microsoft WARP. Each backend matched all four channels of 4,096 pixels exactly. The fixture is generated from source and uses no game data.AI-assisted. The Windows results were verified locally.