test(shader): cover the SOPK s_waitcnt counters and count them as decoded #383
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/383"
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 DotDebian on 2026-10-02T16:56:47Z.
What
The decoder already maps the four SOPK wait instructions (
s_waitcnt_vscnt,s_waitcnt_vmcnt,s_waitcnt_expcnt,s_waitcnt_lgkmcnt, opcodes 0x17 to 0x1a) toSWaitcnt, but no test encodes any of them andtools/progress.pyonly countsS_WAITCNT_VSCNT.tests/execution/ScalarSopkWaitcnt.cppruns each of the four opcodes with the register field set tonulland to a live SGPR, and with levels 0, 0x3f and 0xffff. It checks that the wait leaves SCC as it was (once set, once clear) and leaves the register named in its field unchanged: LLVM'sSOPK_WAITCNTtakes that field as a source, not a destination.tools/progress.pylists the three other counters as variants ofSWaitcnt(+3 SOPK instructions, 695 to 698).No change to the recompiler. Opcode numbers are the GFX10 ones from LLVM's
SOPInstructions.td(SOPK_Real32_gfx10<0x017>to<0x01a>).The
OPCODE_VARIANTSline edited here sits between the lines added by #363 and #380: it conflicts textually with both (one line, no functional dependency). I will rebase once they are merged.Tested
Windows 11, MinGW-w64 GCC 15.2.0,
ctest: 109/109 pass, including the newagc_driver_scalar_sopk_waitcnt(ran on a real Vulkan device, not skipped). Since the recompiler is unchanged, the test was checked against deliberately broken decoders instead, one opcode at a time: 0x17 rejected, 0x18 decoded ass_movk_i32, 0x19 ass_cmpk_eq_i32, 0x1a ass_cmpk_lg_i32. It fails on each and passes on the unmodified decoder. No title was run.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T05:43:34Z.
This looks good to me. #363 and #380 just merged and touch the same
OPCODE_VARIANTStable in tools/progress.py, so this needs the one-line rebase you offered. After that it looks ready to merge from my side.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T22:37:59Z.
Thanks for the rebase; the only change is the
OPCODE_VARIANTScontext after #363 and #380, and CI is green.agc_driver_scalar_sopk_waitcntpasses here on current main. Ready to merge from my side.