From 01bae4dd79dfcb64d344aa4867bb937354963310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Franch?= Date: Sun, 4 Oct 2026 08:23:37 +0200 Subject: [PATCH] fix(shader): track the multi-register destinations of the quad SAD ops in vertex fetch analysis Co-Authored-By: Claude --- .../Translation/src/EmbeddedVertexFetch.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/shader/recompiler/Translation/src/EmbeddedVertexFetch.cpp b/core/shader/recompiler/Translation/src/EmbeddedVertexFetch.cpp index da66abcb0..e55a8ceaa 100644 --- a/core/shader/recompiler/Translation/src/EmbeddedVertexFetch.cpp +++ b/core/shader/recompiler/Translation/src/EmbeddedVertexFetch.cpp @@ -158,7 +158,16 @@ std::uint32_t decodedDstSize(const RdnaInstruction& inst) { } std::uint32_t embeddedFetchDstSize(const RdnaInstruction& inst) { - return inst.op == RdnaOpcode::VMadU64U32 ? 2u : decodedDstSize(inst); + switch (inst.op) { + case RdnaOpcode::VMadU64U32: + case RdnaOpcode::VQsadPkU16U8: + case RdnaOpcode::VMqsadPkU16U8: + return 2u; + case RdnaOpcode::VMqsadU32U8: + return 4u; + default: + return decodedDstSize(inst); + } } // How many consecutive SGPRs a scalar operand of the instruction names, over-estimated where the