VideoCommon: remove XFReg copy optimization

This code is just ugly and I doubt there is a way that copying twice is faster.
This commit is contained in:
degasus 2014-09-03 22:39:26 +02:00
parent e1248599eb
commit ef6f6a7fa9
4 changed files with 15 additions and 101 deletions

View file

@ -34,47 +34,6 @@
u8* g_pVideoData = nullptr;
bool g_bRecordFifoData = false;
typedef void (*DataReadU32xNfunc)(u32 *buf);
#if _M_SSE >= 0x301
static DataReadU32xNfunc DataReadU32xFuncs_SSSE3[16] = {
DataReadU32xN_SSSE3<1>,
DataReadU32xN_SSSE3<2>,
DataReadU32xN_SSSE3<3>,
DataReadU32xN_SSSE3<4>,
DataReadU32xN_SSSE3<5>,
DataReadU32xN_SSSE3<6>,
DataReadU32xN_SSSE3<7>,
DataReadU32xN_SSSE3<8>,
DataReadU32xN_SSSE3<9>,
DataReadU32xN_SSSE3<10>,
DataReadU32xN_SSSE3<11>,
DataReadU32xN_SSSE3<12>,
DataReadU32xN_SSSE3<13>,
DataReadU32xN_SSSE3<14>,
DataReadU32xN_SSSE3<15>,
DataReadU32xN_SSSE3<16>
};
#endif
static DataReadU32xNfunc DataReadU32xFuncs[16] = {
DataReadU32xN<1>,
DataReadU32xN<2>,
DataReadU32xN<3>,
DataReadU32xN<4>,
DataReadU32xN<5>,
DataReadU32xN<6>,
DataReadU32xN<7>,
DataReadU32xN<8>,
DataReadU32xN<9>,
DataReadU32xN<10>,
DataReadU32xN<11>,
DataReadU32xN<12>,
DataReadU32xN<13>,
DataReadU32xN<14>,
DataReadU32xN<15>,
DataReadU32xN<16>
};
static u32 InterpretDisplayList(u32 address, u32 size)
{
u8* old_pVideoData = g_pVideoData;
@ -182,9 +141,7 @@ static u32 Decode(u8* end, bool skipped_frame)
return 0;
cycles = 18 + 6 * transfer_size;
u32 xf_address = Cmd2 & 0xFFFF;
GC_ALIGNED128(u32 data_buffer[16]);
DataReadU32xFuncs[transfer_size-1](data_buffer);
LoadXFReg(transfer_size, xf_address, data_buffer);
LoadXFReg(transfer_size, xf_address);
INCSTAT(stats.thisFrame.numXFLoads);
}
@ -296,14 +253,6 @@ static u32 Decode(u8* end, bool skipped_frame)
void OpcodeDecoder_Init()
{
g_pVideoData = GetVideoBufferStartPtr();
#if _M_SSE >= 0x301
if (cpu_info.bSSSE3)
{
for (int i = 0; i < 16; ++i)
DataReadU32xFuncs[i] = DataReadU32xFuncs_SSSE3[i];
}
#endif
}