Support absolute-value operands in pixel shader translation #88
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/89"
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 R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-21T15:48:11Z.
Summary
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.