Tests say matrices apply mask to last col (kinda.)

It seems inconsistent but probably better than before.  Also add an error.
This commit is contained in:
Unknown W. Brackets committed 2013-02-18 13:19:16 -08:00
1 parent 6c479eb7ab
commit 179fccaff7
1 file changed
+11 -7
+11 -7
View File
@@ -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; i<side; i++) {
for (int j=0; j<side; j++) {
// Hm, I wonder if this should affect matrices at all.
if (!currentMIPS->VfpuWriteMask(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];
}
}
}