shader: decode S_CLAUSE as a no-op hint #2032
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!2032
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2032/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?
@MrBigBritches on GitHub · 2026-10-31 20:28 UTC · original
MrBigBritches:shader-s-clause→main· +5 −1 · 4 files · 1 commits · merged 2026-10-31 22:30 UTCSummary
The decoder marked
S_CLAUSE(SOPP 0x21) unsupported, so any shader containing it failed to build its CFG.S_CLAUSEonly asks the hardware to issue the following memory instructions together. It changes no registers, memory or observable ordering, becauses_waitcntstill orders them.S_INST_PREFETCH.Tests
TestSoppClauseHintinshader_cfgcompares a program with and without anS_CLAUSEword (0xbfa10001) at five levels:Note
This touches the same spots as the V_SWAP_B32 PR (a new test after
TestNggVertexEntryStateinshaderCfgTests.cppand its call inmain()). Whichever lands second needs a trivial rebase that keeps both sides.@coderabbitai[bot] on GitHub · 2026-10-31 20:35 UTC · original
No actionable comments were generated in the recent review.
5dac5573-244c-44dc-8862-1bef0b5b4f51Reviewing files that changed from the base of the PR and between
bbf96a5e9fand 6efb7c4c13739453e884e0e4d5e19d03e95db093.src/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/translate/Scalar.cpptests/ShaderRecompilerComputeTests.cpptests/shaderCfgTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Walkthrough
The decoder now recognizes SOPP opcode
0x21asS_CLAUSEand decodes its immediate operand. Instruction formatting includes the opcode and operand. Scalar translation handlesS_CLAUSEwithout emitting IR operations. Regression tests check decoding, CFG behavior, translated IR, and emitted SPIR-V against a shader without the hint.Suggested reviewers:
nmzikChange: Bug fix
Merge Risk:
Minimal · up to
6efb7The change accepts S_CLAUSE as a hint without emitting shader operations. No merge-blocking issue is identified; run the normal checks before merging.
Pre-merge checks:
4 ·
1
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 4 files. (2 skipped: 2 too large.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
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