vertexloader_pos cleanup - remove the branch per vertex. not much of a speedup though.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2256 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-02-15 14:46:17 +00:00
parent 6deb87c176
commit c49f969563
4 changed files with 119 additions and 136 deletions

View File

@ -79,10 +79,26 @@ inline u16 DataRead()
return tmp;
}
template <>
inline s16 DataRead()
{
s16 tmp = (s16)Common::swap16(*(u16*)g_pVideoData);
g_pVideoData += 2;
return tmp;
}
template <>
inline u32 DataRead()
{
u32 tmp = Common::swap32(*(u32*)g_pVideoData);
u32 tmp = (u32)Common::swap32(*(u32*)g_pVideoData);
g_pVideoData += 4;
return tmp;
}
template <>
inline s32 DataRead()
{
s32 tmp = (s32)Common::swap32(*(u32*)g_pVideoData);
g_pVideoData += 4;
return tmp;
}