Repository navigation
feat(shader): decode cache invalidations and performance hints as no-ops - #253
Merged
boykopovar merged 2 commits intoOct 2, 2026
Merged
Conversation
adriadam10
force-pushed
the
feat/shader-cache-hint-noops
branch
from
October 1, 2026 19:59
61a54c7 to
b3ae67e
Compare
This was referenced Oct 1, 2026
Merged
MixPrecision and SdwaDestination dispatch hand-assembled RDNA through the recompiler and compare every lane with a CPU model, but were never in ctest. Move them to tests/execution/, which is globbed into one test per file with the same target names, so new execution tests add a file and no CMake lines. They exit 77 (skipped) when the host has no Vulkan device; the Linux runner installs lavapipe and sets ANYPS5_REQUIRE_VULKAN=1 so they cannot skip there. Co-Authored-By: Claude <noreply@anthropic.com>
s_icache_inv, s_incperflevel, s_decperflevel, s_ttracedata_imm, s_wait_idle, s_gl1_inv, s_dcache_inv, s_dcache_wb, buffer_gl0_inv and buffer_gl1_inv threw in the decoder. SPIR-V has no cache control, so they translate like s_clause and s_waitcnt, which already emit nothing. The SMEM and MUBUF forms carry no operands, so no pass sees a phantom base or destination register. Co-Authored-By: Claude <noreply@anthropic.com>
adriadam10
force-pushed
the
feat/shader-cache-hint-noops
branch
from
October 1, 2026 20:51
b3ae67e to
e56511f
Compare
This was referenced Oct 2, 2026
Merged
9 tasks done
This was referenced Oct 2, 2026
This was referenced Oct 2, 2026
This was referenced Oct 2, 2026
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
These threw in the decoder ("unsupported SOPP opcode", "SMEM/MUBUF opcode is not supported"):
s_icache_inv,s_incperflevel,s_decperflevel,s_wait_idle,s_ttracedata_imm(same ass_ttracedata)s_gl1_inv,s_dcache_inv,s_dcache_wbbuffer_gl0_inv,buffer_gl1_invSPIR-V has no cache control, so they translate like
s_clause/s_waitcnt, which already emit nothing (ControlNop/Waitcntlower to no SPIR-V).s_wait_idlegoes toWaitcnt, the rest toControlNop. The SMEM/MUBUF forms are decoded without operands (cacheControlInstruction), so the register analyses don't see a phantoms0/v0destination or a descriptor base.Found with an ISA sweep (every gfx1013 opcode from
llvm-mcthroughDecodeRdnaInstruction+TranslateInstruction). shadPS4 does not translate the GCN equivalents (they hitUNREACHABLE), so there is no reference behaviour to follow; no-op is what the existing wait/hint opcodes do here.Test
agc_driver_cache_control: hand-assembled compute shader (words fromllvm-mc -mcpu=gfx1013 -show-encoding) that loads a dword, runs all ten instructions around the load, adds 1 and stores; all 64 lanes are checked through the fullRecompile+ dispatch path.Tested
Linux: passes on RADV (Radeon 660M) and lavapipe; without the change it fails with "unsupported SOPP opcode 19". Full ctest (99) passes. CI runs it on lavapipe through #251.
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)VulkanTestDevice.hpp+ lavapipe in CI); review only the last commit