mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
HLE: Swap endian in matrix multiply replacement.
This commit is contained in:
parent
9a3e5879bb
commit
1556187d36
1 changed files with 15 additions and 3 deletions
|
@ -408,13 +408,25 @@ static int Replace_fabsf() {
|
|||
}
|
||||
|
||||
static int Replace_vmmul_q_transp() {
|
||||
float *out = (float *)Memory::GetPointer(PARAM(0));
|
||||
const float *a = (const float *)Memory::GetPointer(PARAM(1));
|
||||
const float *b = (const float *)Memory::GetPointer(PARAM(2));
|
||||
float_le *out = (float_le *)Memory::GetPointer(PARAM(0));
|
||||
const float_le *a = (const float_le *)Memory::GetPointer(PARAM(1));
|
||||
const float_le *b = (const float_le *)Memory::GetPointer(PARAM(2));
|
||||
|
||||
// TODO: Actually use an optimized matrix multiply here...
|
||||
if (out && b && a) {
|
||||
#ifdef COMMON_BIG_ENDIAN
|
||||
float outn[16], an[16], bn[16];
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
an[i] = a[i];
|
||||
bn[i] = b[i];
|
||||
}
|
||||
Matrix4ByMatrix4(outn, bn, an);
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
out[i] = outn[i];
|
||||
}
|
||||
#else
|
||||
Matrix4ByMatrix4(out, b, a);
|
||||
#endif
|
||||
}
|
||||
return 16;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue