You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
S_WAITCNT_VMCNT/EXPCNT/LGKMCNT decode to their own opcodes (previously folded into generic SWaitcnt) and reuse the wait translation, including the immediate-operand decode and the wait-opcode classifications.
The S_FLBIT_I32/S_QUADMASK_B32 parts of the original revision have since landed in main via other work; the test still covers all five encodings.
Tested
Linux (GCC, BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=OFF): full build, ctest 126/126 pass, including the new scalar_misc_ops test.
Checklist
Based on current main; no other open PR implements the same opcodes (checked open shader PRs)
One topic per PR; follow-ups go in a new PR
No comments in code except technical debt
Unimplemented paths throw (decoding unknown opcodes still throws)
No notes, investigation .md files or images added to the repository (attach them to this PR)
New third-party code is a submodule built from source (none added)
asimplestray
changed the title
feat(shader): implement scalar misc ops and waitcnt variants
feat(shader): implement waitcnt counter variants
Oct 2, 2026
Thanks for this. On main, SOPK 0x18 to 0x1a already decode to SWaitcnt and translate as a wait (decodeSopkOpcode in RdnaScalarOpDecoder.cpp). This PR gives them their own enum values but doesn't change what any shader does. #383 has landed and counts the three for the progress report, with an execution test, so I think this one can be closed. If there's a behavioural difference I missed, let me know.
Closing, as Dean noted above: on main, SOPK 0x18-0x1a already decode to SWaitcnt (RdnaScalarOpDecoder.cpp) and translate as a wait, so the new enum values don't change what any shader does, and #383 already counts the three in the progress report with an execution test. Thanks for the work; feel free to reopen if there's a behavioural difference we missed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements 3 SOPK opcodes (
0x18-0x1A, verified against LLVM's GFX10 disassembler tests):S_WAITCNT_VMCNT/EXPCNT/LGKMCNTdecode to their own opcodes (previously folded into genericSWaitcnt) and reuse the wait translation, including the immediate-operand decode and the wait-opcode classifications.The
S_FLBIT_I32/S_QUADMASK_B32parts of the original revision have since landed inmainvia other work; the test still covers all five encodings.Tested
Linux (GCC,
BUILD_TESTING=ON,ANYPS5_ENABLE_SPIRV_TOOLS=OFF): full build,ctest126/126 pass, including the newscalar_misc_opstest.Checklist
main; no other open PR implements the same opcodes (checked open shader PRs).mdfiles or images added to the repository (attach them to this PR)