From 179fccaff7fed79fb32ac4a05240560da4871ead Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 18 Feb 2013 12:59:41 -0800 Subject: [PATCH] Tests say matrices apply mask to last col (kinda.) It seems inconsistent but probably better than before. Also add an error. --- Core/MIPS/MIPSVFPUUtils.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Core/MIPS/MIPSVFPUUtils.cpp b/Core/MIPS/MIPSVFPUUtils.cpp index 21ebfb844b..0f6ad315eb 100644 --- a/Core/MIPS/MIPSVFPUUtils.cpp +++ b/Core/MIPS/MIPSVFPUUtils.cpp @@ -179,19 +179,23 @@ void WriteMatrix(const float *rd, MatrixSize size, int reg) { case M_4x4: row = (reg>>5)&2; side = 4; break; } - int transpose = (reg>>5)&1; + int transpose = (reg>>5)&1; + + if (currentMIPS->VfpuWriteMask() != 0) { + ERROR_LOG(CPU, "Write mask used with vfpu matrix instruction."); + } for (int i=0; iVfpuWriteMask(i)) + if (j != side -1 || !currentMIPS->VfpuWriteMask(i)) { - int index = mtx * 4; + int index = mtx * 4; if (transpose) - index += ((row+i)&3) + ((col+j)&3)*32; - else - index += ((col+j)&3) + ((row+i)&3)*32; - V(index) = rd[j*4+i]; + index += ((row+i)&3) + ((col+j)&3)*32; + else + index += ((col+j)&3) + ((row+i)&3)*32; + V(index) = rd[j*4+i]; } } }