mirror of https://github.com/PCSX2/pcsx2.git
GCC compilation fixes.
(note to devs: a sure-fire fix for GCC's templated function problems is to typecast the templated function to itself explicitly -- works nicely for all versions of GCC and the ?: operator as well). git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3763 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
2f8f86a3eb
commit
59ebdf3e60
|
@ -38,7 +38,6 @@ static __fi void vifFlush(int idx) {
|
|||
}
|
||||
|
||||
static __fi void vuExecMicro(int idx, u32 addr) {
|
||||
VURegs& VU = vuRegs[idx];
|
||||
VIFregisters& vifRegs = vifXRegs;
|
||||
int startcycles = 0;
|
||||
//vifFlush(idx);
|
||||
|
|
|
@ -33,7 +33,7 @@ static __fi u32 setVifRow(vifStruct& vif, u32 reg, u32 data) {
|
|||
// cycle derives from vif.cl
|
||||
// mode derives from vifRegs.mode
|
||||
template< uint idx, uint mode, bool doMask >
|
||||
static __ri void writeXYZW(u32 offnum, u32 &dest, u32 data, bool isV4_5 = false) {
|
||||
static __ri void writeXYZW(u32 offnum, u32 &dest, u32 data) {
|
||||
int n = 0;
|
||||
|
||||
vifStruct& vif = GetVifX;
|
||||
|
@ -110,10 +110,10 @@ static void __fastcall UNPACK_V4_5(u32 *dest, const u32* src)
|
|||
{
|
||||
u32 data = *src;
|
||||
|
||||
writeXYZW<idx,0,doMask>(OFFSET_X, *(dest+0), ((data & 0x001f) << 3), true);
|
||||
writeXYZW<idx,0,doMask>(OFFSET_Y, *(dest+1), ((data & 0x03e0) >> 2), true);
|
||||
writeXYZW<idx,0,doMask>(OFFSET_Z, *(dest+2), ((data & 0x7c00) >> 7), true);
|
||||
writeXYZW<idx,0,doMask>(OFFSET_W, *(dest+3), ((data & 0x8000) >> 8), true);
|
||||
writeXYZW<idx,0,doMask>(OFFSET_X, *(dest+0), ((data & 0x001f) << 3));
|
||||
writeXYZW<idx,0,doMask>(OFFSET_Y, *(dest+1), ((data & 0x03e0) >> 2));
|
||||
writeXYZW<idx,0,doMask>(OFFSET_Z, *(dest+2), ((data & 0x7c00) >> 7));
|
||||
writeXYZW<idx,0,doMask>(OFFSET_W, *(dest+3), ((data & 0x8000) >> 8));
|
||||
}
|
||||
|
||||
// =====================================================================================================
|
||||
|
|
|
@ -19,8 +19,8 @@ struct vifStruct;
|
|||
|
||||
typedef void (__fastcall *UNPACKFUNCTYPE)(void* dest, const void* src);
|
||||
|
||||
#define create_unpack_u_type(bits) typedef void (__fastcall *UNPACKFUNCTYPE_u##bits)(u32* dest);
|
||||
#define create_unpack_s_type(bits) typedef void (__fastcall *UNPACKFUNCTYPE_s##bits)(u32* dest);
|
||||
#define create_unpack_u_type(bits) typedef void (__fastcall *UNPACKFUNCTYPE_u##bits)(u32* dest, const u##bits* src);
|
||||
#define create_unpack_s_type(bits) typedef void (__fastcall *UNPACKFUNCTYPE_s##bits)(u32* dest, const s##bits* src);
|
||||
|
||||
#define create_some_unpacks(bits) \
|
||||
create_unpack_u_type(bits); \
|
||||
|
|
Loading…
Reference in New Issue