From 3cb1c33fd91a49f1442c8d1f9201650edc78f4bc Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 16 Jun 2019 18:28:20 -0700 Subject: [PATCH] interp: Fix dumb mistake in vtfm. Had done final testing on this with a 2x2 matrix because it was simpler... Fixes #12109. --- Core/MIPS/MIPSIntVFPU.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Core/MIPS/MIPSIntVFPU.cpp b/Core/MIPS/MIPSIntVFPU.cpp index 1314b1239e..bab74cb85a 100644 --- a/Core/MIPS/MIPSIntVFPU.cpp +++ b/Core/MIPS/MIPSIntVFPU.cpp @@ -1590,9 +1590,13 @@ namespace MIPSInt VFPUConst constZ = n < 3 ? VFPUConst::ZERO : VFPUConst::NONE; VFPUConst constW = n < 4 ? VFPUConst::ZERO : VFPUConst::NONE; if (ins >= n) { - constY = ins == 1 ? VFPUConst::ONE : VFPUConst::ZERO; - constZ = ins == 2 ? VFPUConst::ONE : VFPUConst::ZERO; - constW = ins == 3 ? VFPUConst::ONE : VFPUConst::ZERO; + if (ins == 1) { + constY = VFPUConst::ONE; + } else if (ins == 2) { + constZ = VFPUConst::ONE; + } else if (ins == 3) { + constW = VFPUConst::ONE; + } } u32 tprefixRemove = VFPU_SWIZZLE(0, n < 2 ? 3 : 0, n < 3 ? 3 : 0, n < 4 ? 3 : 0); u32 tprefixAdd = VFPU_MAKE_CONSTANTS(constX, constY, constZ, constW);