Repository navigation
feat(agc): let agc_shader_replay write a request's code words for other disassemblers - #456
Merged
oneandonlydean merged 1 commit intoOct 3, 2026
Conversation
…er disassemblers --code writes the shader's code as <request name>.code in the working directory, as raw little-endian words for llvm-mc -triple amdgcn -mcpu=gfx1030 --disassemble. --asm prints only the first word of each instruction.
9 tasks done
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
agc_shader_replay --codewrites the request's shader code as<request name>.codein the working directory: the raw little-endian code words, ready for another disassembler, for examplellvm-mc -triple amdgcn -mcpu=gfx1030 --disassemble.--asmprints only the first word of each instruction, so literals and the second dword of VOP3, MUBUF or MIMG encodings were not visible without decoding them by hand.The file is written the way
--spvwrites its output. If it cannot be written, the request is reported as failed ("could not write ...") instead of being skipped silently.Tested
agc_shader_replay(it isEXCLUDE_FROM_ALL, so CI does not build it) and the full tree withBUILD_TESTING=ON.shader_500696500.req, 4200 code words) with--code: the 16800-byte file disassembles withllvm-mc -mcpu=gfx1030, and its first instructions match the raw words--asmprints (s_inst_prefetch 0x3,s_lshl_b32 vcc_lo, s14, 2,s_buffer_load_dword, ...). In a read-only directory the request fails with "could not write shader_500696500.req.code".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)