mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Optimize vertex loader with a mini JIT (only first step, more optimizations may follow). Some various error message and warning fixes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1276 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -23,9 +23,8 @@
|
||||
// ==============================================================================
|
||||
// Direct
|
||||
// ==============================================================================
|
||||
void LOADERDECL Pos_ReadDirect_UByte(const void *_p)
|
||||
void LOADERDECL Pos_ReadDirect_UByte()
|
||||
{
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
((float*)VertexManager::s_pCurBufferPointer)[0] = (float)DataReadU8() * posScale;
|
||||
((float*)VertexManager::s_pCurBufferPointer)[1] = (float)DataReadU8() * posScale;
|
||||
if (pVtxAttr->PosElements)
|
||||
@ -36,9 +35,8 @@ void LOADERDECL Pos_ReadDirect_UByte(const void *_p)
|
||||
VertexManager::s_pCurBufferPointer += 12;
|
||||
}
|
||||
|
||||
void LOADERDECL Pos_ReadDirect_Byte(const void *_p)
|
||||
void LOADERDECL Pos_ReadDirect_Byte()
|
||||
{
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
((float*)VertexManager::s_pCurBufferPointer)[0] = (float)(s8)DataReadU8() * posScale;
|
||||
((float*)VertexManager::s_pCurBufferPointer)[1] = (float)(s8)DataReadU8() * posScale;
|
||||
if (pVtxAttr->PosElements)
|
||||
@ -49,9 +47,8 @@ void LOADERDECL Pos_ReadDirect_Byte(const void *_p)
|
||||
VertexManager::s_pCurBufferPointer += 12;
|
||||
}
|
||||
|
||||
void LOADERDECL Pos_ReadDirect_UShort(const void *_p)
|
||||
void LOADERDECL Pos_ReadDirect_UShort()
|
||||
{
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
((float*)VertexManager::s_pCurBufferPointer)[0] = (float)DataReadU16() * posScale;
|
||||
((float*)VertexManager::s_pCurBufferPointer)[1] = (float)DataReadU16() * posScale;
|
||||
if (pVtxAttr->PosElements)
|
||||
@ -62,9 +59,8 @@ void LOADERDECL Pos_ReadDirect_UShort(const void *_p)
|
||||
VertexManager::s_pCurBufferPointer += 12;
|
||||
}
|
||||
|
||||
void LOADERDECL Pos_ReadDirect_Short(const void *_p)
|
||||
void LOADERDECL Pos_ReadDirect_Short()
|
||||
{
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
((float*)VertexManager::s_pCurBufferPointer)[0] = (float)(s16)DataReadU16() * posScale;
|
||||
((float*)VertexManager::s_pCurBufferPointer)[1] = (float)(s16)DataReadU16() * posScale;
|
||||
if (pVtxAttr->PosElements)
|
||||
@ -75,9 +71,8 @@ void LOADERDECL Pos_ReadDirect_Short(const void *_p)
|
||||
VertexManager::s_pCurBufferPointer += 12;
|
||||
}
|
||||
|
||||
void LOADERDECL Pos_ReadDirect_Float(const void *_p)
|
||||
void LOADERDECL Pos_ReadDirect_Float()
|
||||
{
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
((float*)VertexManager::s_pCurBufferPointer)[0] = DataReadF32();
|
||||
((float*)VertexManager::s_pCurBufferPointer)[1] = DataReadF32();
|
||||
if (pVtxAttr->PosElements)
|
||||
@ -127,37 +122,32 @@ void LOADERDECL Pos_ReadDirect_Float(const void *_p)
|
||||
// ==============================================================================
|
||||
// Index 8
|
||||
// ==============================================================================
|
||||
void LOADERDECL Pos_ReadIndex8_UByte(const void *_p)
|
||||
void LOADERDECL Pos_ReadIndex8_UByte()
|
||||
{
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
u8 Index = DataReadU8();
|
||||
Pos_ReadIndex_Byte(u8);
|
||||
}
|
||||
|
||||
void LOADERDECL Pos_ReadIndex8_Byte(const void *_p)
|
||||
void LOADERDECL Pos_ReadIndex8_Byte()
|
||||
{
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
u8 Index = DataReadU8();
|
||||
Pos_ReadIndex_Byte(s8);
|
||||
}
|
||||
|
||||
void LOADERDECL Pos_ReadIndex8_UShort(const void *_p)
|
||||
void LOADERDECL Pos_ReadIndex8_UShort()
|
||||
{
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
u8 Index = DataReadU8();
|
||||
Pos_ReadIndex_Short(u16);
|
||||
}
|
||||
|
||||
void LOADERDECL Pos_ReadIndex8_Short(const void *_p)
|
||||
void LOADERDECL Pos_ReadIndex8_Short()
|
||||
{
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
u8 Index = DataReadU8();
|
||||
Pos_ReadIndex_Short(s16);
|
||||
}
|
||||
|
||||
void LOADERDECL Pos_ReadIndex8_Float(const void *_p)
|
||||
void LOADERDECL Pos_ReadIndex8_Float()
|
||||
{
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
u8 Index = DataReadU8();
|
||||
Pos_ReadIndex_Float();
|
||||
}
|
||||
@ -166,34 +156,29 @@ void LOADERDECL Pos_ReadIndex8_Float(const void *_p)
|
||||
// Index 16
|
||||
// ==============================================================================
|
||||
|
||||
void LOADERDECL Pos_ReadIndex16_UByte(const void *_p){
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
void LOADERDECL Pos_ReadIndex16_UByte(){
|
||||
u16 Index = DataReadU16();
|
||||
Pos_ReadIndex_Byte(u8);
|
||||
}
|
||||
|
||||
void LOADERDECL Pos_ReadIndex16_Byte(const void *_p){
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
void LOADERDECL Pos_ReadIndex16_Byte(){
|
||||
u16 Index = DataReadU16();
|
||||
Pos_ReadIndex_Byte(s8);
|
||||
}
|
||||
|
||||
void LOADERDECL Pos_ReadIndex16_UShort(const void *_p){
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
void LOADERDECL Pos_ReadIndex16_UShort(){
|
||||
u16 Index = DataReadU16();
|
||||
Pos_ReadIndex_Short(u16);
|
||||
}
|
||||
|
||||
void LOADERDECL Pos_ReadIndex16_Short(const void *_p)
|
||||
void LOADERDECL Pos_ReadIndex16_Short()
|
||||
{
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
u16 Index = DataReadU16();
|
||||
Pos_ReadIndex_Short(s16);
|
||||
}
|
||||
|
||||
void LOADERDECL Pos_ReadIndex16_Float(const void *_p)
|
||||
void LOADERDECL Pos_ReadIndex16_Float()
|
||||
{
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
u16 Index = DataReadU16();
|
||||
Pos_ReadIndex_Float();
|
||||
}
|
||||
|
Reference in New Issue
Block a user