Repository navigation
docs(shader): record the measured s_call_b64 and null s_swappc_b64 behaviour - #2381
Conversation
|
The overlap is TechnicalDebt only: #2302 rewrites the AI-assisted: yes (Claude Code). |
…haviour Measured on RDNA2 (gfx1036) with tools/hw-oracle in wave32 and wave64: s_call_b64 writes PC + 4 to the link pair and branches to PC + 4 + signext(SIMM16) * 4, and s_setpc_b64 of the link returns; s_swappc_b64 with SDST 125 branches and leaves a marker pair untouched, so its decode as s_setpc_b64 matches, and with an SGPR destination the link is PC + 4. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012GLfKH7Sqe51wX254k1XsV
|
Reproduced both measurements on gfx1035 with |
c81b5af to
9376a02
Compare
…easurements docs(shader): record the measured s_call_b64 and null s_swappc_b64 behaviour
What
Two TechnicalDebt entries said what the recompiler assumes without a hardware measurement. Measured on RDNA2 (gfx1036, Ryzen 7950X3D iGPU) with
tools/hw-oracle(Linux, CachyOS kernel 7.2.9, hsa-rocr 7.2.4, clang 23.1.1 as the assembler, tools atmaind70b899, mode IEEE 0, f32 denormals flushed, f16/f64 kept, DX10_CLAMP 1, RNE), in wave32 and wave64, and recorded in the entries:s_call_b64(SIMM16 = 3): the link pair receivesPC + 4and the branch goes toPC + 4 + signext(SIMM16) * 4;s_setpc_b64of the link returns to the instruction after the call (a counter shows the callee, +1, and the return path, +2, each ran once). The entry's "native RDNA2 ... execution" becomes measured; execution on the PS5 (gfx1013) and title compatibility stay unverified.s_swappc_b64with SDST 125 (the null register): the hardware branches to the source pair (the instruction at the skipped address is not executed) and leaves a marker SGPR pair untouched; with an SGPR destination the link isPC + 4. So the existing decode ass_setpc_b64matches the hardware.The
s_memtimemeasurements from the same run are posted on fix(agc): detect AMD proprietary narrow clock #1632, which rewrites that entry.No code changes. Bodies, rows, outputs and the script: https://github.com/SleglJan/AnyPS5/tree/audit/oracle-2026-10-08/oracle-audit/scalar-misc.
Tested
tools/check_conventions.py --base upstream/mainpasses; the entries are documentation only.Overlap: #2302 (open) edits the same
s_swappc_b64entry, and #2161 and #2178 add entries next to thes_call_b64one; none of them shares code with this PR or is built on by it, so whichever merges second needs a one-line rebase.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