shader: support S_MUL_HI_I32 (SOP2 0x36) #576
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!576
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/576/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?
@francoisatt on GitHub · 2026-09-11 22:44 UTC · original
francoisatt:feat/sop2-mul-hi-i32→main· +9 −0 · 4 files · 1 commits · merged 2026-09-12 10:56 UTCDakar Desert Rally (PPSA04477) fails shader recompilation on SOP2 opcode 0x36
— see #281, raw=[0x9b0cff6b], still current on
2e315a3.Change. Decode and translate only. The signed high-multiply IR opcode already
exists and is fully wired: SMulHi (ValueOpcodes.inc), lowered through
EmitMulHigh(..., signed=true) in spirvEmitterAlu.cpp, already used by VOP1
V_MUL_HI_I32 and folded by ConstantPropagation. So this adds the table entry,
the enum value next to S_MUL_HI_U32, and the translate case — nothing
downstream.
Tests. shaderCfgTests gains a paired case: S_MUL_HI_U32 must lower to
UMulHighU32 and S_MUL_HI_I32 to SMulHighI32, so the signedness is asserted
rather than assumed.
Verification. Clean build on Windows, clang-cl 19.1.5, Ninja. 36/37 tests pass
— the only failure is kernel_file_system, which fails on clean main as well
(see #505; PR #565 is not merged here).
Not verified at runtime — I don't have the title.
References
AI assistance. Written with AI assistance; every change reviewed, built and
tested locally by me.