shader: mark unsupported scalar operands instead of aborting #1331
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!1331
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1331/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?
@HamsterCL on GitHub · 2026-10-09 20:44 UTC · original
HamsterCL:fix/shader-decoder-unsupported-operands→main· +99 −64 · 8 files · 2 commits · closed without mergingSplit out of #1313 (closed); F64 VOPC is already in main and not part of this PR.
DecodeScalarSource/DecodeScalarDestinationtake theInstructionand callSetUnsupportedfor reserved operand codes (e.g. trap temporaries) instead ofEXIT-ing the emulator.ResolveSetpc*JumpTableaccepts the smallest valid setpc index.Sendmsgis treated as having side effects so it is not removed as dead code.Built and ran all 53 ctest tests locally (Windows, clang-cl).
@HamsterCL on GitHub · 2026-10-09 20:45 UTC · original
@coderabbitai review
@coderabbitai[bot] on GitHub · 2026-10-09 20:49 UTC · original · edited 2026-10-10 02:38 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
a76c4212-9c9a-4a51-9581-943730681c98📥 Commits
Reviewing files that changed from the base of the PR and between df3043326bf5fa77c398963687a447deb037cd1b and
8660208c71.📒 Files selected for processing (2)
src/graphics/shader/recompiler/frontend/decode/ShaderDecoder.hsrc/graphics/shader/recompiler/frontend/decode/VectorAluOps.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.
📝 Walkthrough
📝 Walkthrough
Walkthrough
Scalar operand decoders now receive the containing instruction and mark unsupported codes on that instruction instead of aborting. Image and memory decode paths also pass the program counter to scalar operand decoders. The jump-table recognizers accept lower minimum indices for their predecessor patterns.
HasSideEffectsnow classifiesSendmsgas side-effecting.Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
86602Unsupported shader operands are reported with their instruction context, and Sendmsg is classified as side-effecting. No material merge risk is established.
Pre-merge checks |
4 |
1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@coderabbitai[bot] on GitHub · 2026-10-09 20:49 UTC · original · reviewed
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
ee406d6f-844e-47d4-b0a0-b86f629b7a85📥 Commits
Reviewing files that changed from the base of the PR and between
59183dbfa8and e8edd840dd3aaa99871d46b12536f9c3da61fa64.📒 Files selected for processing (8)
src/graphics/shader/recompiler/frontend/cfg/ShaderCFG.cppsrc/graphics/shader/recompiler/frontend/decode/ImageOps.cppsrc/graphics/shader/recompiler/frontend/decode/MemoryOps.cppsrc/graphics/shader/recompiler/frontend/decode/ScalarAluOps.cppsrc/graphics/shader/recompiler/frontend/decode/ShaderDecoder.cppsrc/graphics/shader/recompiler/frontend/decode/ShaderDecoder.hsrc/graphics/shader/recompiler/frontend/decode/VectorAluOps.cppsrc/graphics/shader/recompiler/ir/opcodes/ValueOpcodes.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.
@ -269,0 +273,4 @@// decoded. Mark the whole instruction unsupported right away: an// Unknown operand left unchecked would otherwise reach a reader that// aborts the emulator instead of degrading gracefully.SetUnsupported(inst, inst.family, inst.opcode_id, "unsupported scalar source operand");@coderabbitai[bot] on GitHub · 2026-10-09 20:49 UTC · original · edited 2026-10-09 20:55 UTC
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Preserve graceful failure for an unsupported front-program
S_SETPC_B64source.If a front program ends with
S_SETPC_B64and its source uses a reserved scalar code,SetUnsupportedchanges the opcode toUNSUPPORTED.DecodeFrontProgramthen misses itsS_SETPC_B64break and can reach its fatal final check instead of reporting an unsupported shader. Handle the unsupported terminator inDecodeFrontProgrambefore that check.✅ Addressed in commit df30433
@coderabbitai[bot] on GitHub · 2026-10-09 20:49 UTC · original
⚠️ Action not completed
Already reviewed the last commit. Use
@coderabbitai full reviewto rerun a review of the entire changeset.@HamsterCL on GitHub · 2026-10-09 20:58 UTC · original
@coderabbitai review
@coderabbitai[bot] on GitHub · 2026-10-09 20:59 UTC · original
⚠️ Action not completed
Already reviewed the last commit. Use
@coderabbitai full reviewto rerun a review of the entire changeset.@HamsterCL on GitHub · 2026-10-10 02:30 UTC · original
Rebased onto current main. @coderabbitai review
@coderabbitai[bot] on GitHub · 2026-10-10 02:37 UTC · original
@HamsterCL, I’ll request a review of the rebased changes.⚠️ Action not completed
Already reviewed the last commit. Use
@coderabbitai full reviewto rerun a review of the entire changeset.Pull request closed