feat(shader): implement waitcnt counter variants #387
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/387"
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 boykopovar/AnyPS5. Originally posted by asimplestray on 2026-10-02T17:03:53Z.
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)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-02T17:04:20Z.
Progress report (
7d40a57→b92a852)📈 GPU shader instructions: 64.58% (+0.26%, +3 implemented instructions)
✅ 3 implemented
S_WAITCNT_EXPCNTS_WAITCNT_LGKMCNTS_WAITCNT_VMCNTImported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-06T05:34:29Z.
Thanks for this. On main, SOPK 0x18 to 0x1a already decode to
SWaitcntand translate as a wait (decodeSopkOpcodeinRdnaScalarOpDecoder.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.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-06T20:53:01Z.
Closing, as Dean noted above: on
main, SOPK0x18-0x1aalready decode toSWaitcnt(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.Pull request closed