From 1195af2510cf9b0651037f18fd7fdbc02ef3145f Mon Sep 17 00:00:00 2001 From: NeySlim <4509984+NeySlim@users.noreply.github.com> Date: Tue, 6 Oct 2026 23:16:23 +0200 Subject: [PATCH] decoder: add V_CMPX_U_F32 (#1120) feat(decoder): add V_CMPX_U_F32 --- .../shader/recompiler/frontend/decode/ShaderDecoder.h | 1 + .../shader/recompiler/frontend/decode/VectorAluOps.cpp | 4 +++- src/graphics/shader/recompiler/frontend/translate/Vector.cpp | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/graphics/shader/recompiler/frontend/decode/ShaderDecoder.h b/src/graphics/shader/recompiler/frontend/decode/ShaderDecoder.h index c064b9520..c8aa69209 100644 --- a/src/graphics/shader/recompiler/frontend/decode/ShaderDecoder.h +++ b/src/graphics/shader/recompiler/frontend/decode/ShaderDecoder.h @@ -382,6 +382,7 @@ enum class Opcode { V_CMPX_LG_F32, V_CMPX_GE_F32, V_CMPX_O_F32, + V_CMPX_U_F32, V_CMPX_NGE_F32, V_CMPX_NLG_F32, V_CMPX_NGT_F32, diff --git a/src/graphics/shader/recompiler/frontend/decode/VectorAluOps.cpp b/src/graphics/shader/recompiler/frontend/decode/VectorAluOps.cpp index 8e9b4daaf..39bb7baf9 100644 --- a/src/graphics/shader/recompiler/frontend/decode/VectorAluOps.cpp +++ b/src/graphics/shader/recompiler/frontend/decode/VectorAluOps.cpp @@ -232,7 +232,7 @@ constexpr VopcOpcodeInfo VOPC_OPCODE_LIST[] = { {0x11u, Opcode::V_CMPX_LT_F32}, {0x12u, Opcode::V_CMPX_EQ_F32}, {0x13u, Opcode::V_CMPX_LE_F32}, {0x14u, Opcode::V_CMPX_GT_F32}, {0x15u, Opcode::V_CMPX_LG_F32}, {0x16u, Opcode::V_CMPX_GE_F32}, - {0x17u, Opcode::V_CMPX_O_F32}, + {0x17u, Opcode::V_CMPX_O_F32}, {0x18u, Opcode::V_CMPX_U_F32}, {0x19u, Opcode::V_CMPX_NGE_F32}, {0x1au, Opcode::V_CMPX_NLG_F32}, {0x1bu, Opcode::V_CMPX_NGT_F32}, {0x1cu, Opcode::V_CMPX_NLE_F32}, {0x1du, Opcode::V_CMPX_NEQ_F32}, {0x1eu, Opcode::V_CMPX_NLT_F32}, @@ -892,6 +892,7 @@ bool IsVopcFloatCompareOpcode(Opcode opcode) { case Opcode::V_CMPX_LG_F32: case Opcode::V_CMPX_GE_F32: case Opcode::V_CMPX_O_F32: + case Opcode::V_CMPX_U_F32: case Opcode::V_CMPX_NGE_F32: case Opcode::V_CMPX_NLG_F32: case Opcode::V_CMPX_NGT_F32: @@ -1529,6 +1530,7 @@ bool IsVopcCompareExec(Opcode opcode) { case Opcode::V_CMPX_LG_F32: case Opcode::V_CMPX_GE_F32: case Opcode::V_CMPX_O_F32: + case Opcode::V_CMPX_U_F32: case Opcode::V_CMPX_NGE_F32: case Opcode::V_CMPX_NLG_F32: case Opcode::V_CMPX_NGT_F32: diff --git a/src/graphics/shader/recompiler/frontend/translate/Vector.cpp b/src/graphics/shader/recompiler/frontend/translate/Vector.cpp index b3914e68d..166767b15 100644 --- a/src/graphics/shader/recompiler/frontend/translate/Vector.cpp +++ b/src/graphics/shader/recompiler/frontend/translate/Vector.cpp @@ -344,6 +344,7 @@ void Translator::EmitVector(const Decoder::Instruction& inst) { case O::V_CMP_O_F32: EmitFloatOrderedCompare(inst, true, false); return; case O::V_CMP_U_F32: EmitFloatOrderedCompare(inst, false, false); return; case O::V_CMPX_O_F32: EmitFloatOrderedCompare(inst, true, true); return; + case O::V_CMPX_U_F32: EmitFloatOrderedCompare(inst, false, true); return; case O::V_CMP_CLASS_F32: EmitFloatClassCompare(inst, false); return; case O::V_CMPX_CLASS_F32: EmitFloatClassCompare(inst, true); return; case O::V_CMPX_CLASS_F16: EmitFloatClassCompare(inst, true, true); return;