mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-02 14:52:20 +00:00
Add prefix handling to vfpu color conv per tests.
This commit is contained in:
parent
3f0fc2d851
commit
ab1461faca
@ -1830,7 +1830,8 @@ namespace MIPSComp {
|
||||
|
||||
void IRFrontend::Comp_ColorConv(MIPSOpcode op) {
|
||||
CONDITIONAL_DISABLE;
|
||||
// TODO: Verify if this ignores prefixes?
|
||||
if (js.HasUnknownPrefix())
|
||||
DISABLE;
|
||||
|
||||
// Vector color conversion
|
||||
// d[N] = ConvertTo16(s[N*2]) | (ConvertTo16(s[N*2+1]) << 16)
|
||||
|
@ -928,6 +928,7 @@ namespace MIPSInt
|
||||
u32 s[4];
|
||||
VectorSize sz = V_Quad;
|
||||
ReadVector(reinterpret_cast<float *>(s), sz, vs);
|
||||
ApplySwizzleS(reinterpret_cast<float *>(s), sz);
|
||||
u16 colors[4];
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
@ -965,6 +966,7 @@ namespace MIPSInt
|
||||
colors[i] = col;
|
||||
}
|
||||
u32 ov[2] = {(u32)colors[0] | (colors[1] << 16), (u32)colors[2] | (colors[3] << 16)};
|
||||
ApplyPrefixD(reinterpret_cast<float *>(ov), V_Pair);
|
||||
WriteVector((const float *)ov, V_Pair, vd);
|
||||
PC += 4;
|
||||
EatPrefixes();
|
||||
|
@ -3468,6 +3468,10 @@ void Jit::Comp_VRot(MIPSOpcode op) {
|
||||
}
|
||||
|
||||
void Jit::Comp_ColorConv(MIPSOpcode op) {
|
||||
CONDITIONAL_DISABLE;
|
||||
if (js.HasUnknownPrefix())
|
||||
DISABLE;
|
||||
|
||||
int vd = _VD;
|
||||
int vs = _VS;
|
||||
|
||||
@ -3485,6 +3489,7 @@ void Jit::Comp_ColorConv(MIPSOpcode op) {
|
||||
|
||||
u8 sregs[4];
|
||||
u8 dregs[1];
|
||||
// WARNING: Prefixes.
|
||||
GetVectorRegs(sregs, sz, vs);
|
||||
GetVectorRegs(dregs, V_Pair, vd);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user