From 619e333dcceee874248337e02ef4d682984c92e5 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 19 Jun 2015 15:18:16 -0400 Subject: [PATCH] VertexLoader: Remove the LOADERDECL define. These functions aren't called from jitted code anymore so it isn't necessary. --- Source/Core/VideoCommon/VertexLoader.cpp | 12 +++---- Source/Core/VideoCommon/VertexLoader.h | 7 +--- .../Core/VideoCommon/VertexLoader_Color.cpp | 36 +++++++++---------- Source/Core/VideoCommon/VertexLoader_Color.h | 36 +++++++++---------- .../Core/VideoCommon/VertexLoader_Normal.cpp | 6 ++-- .../VideoCommon/VertexLoader_Position.cpp | 4 +-- .../VideoCommon/VertexLoader_TextCoord.cpp | 6 ++-- 7 files changed, 51 insertions(+), 56 deletions(-) diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp index b8c8fab4de..faf4599fdd 100644 --- a/Source/Core/VideoCommon/VertexLoader.cpp +++ b/Source/Core/VideoCommon/VertexLoader.cpp @@ -22,7 +22,7 @@ u8* g_video_buffer_read_ptr; u8* g_vertex_manager_write_ptr; -static void LOADERDECL PosMtx_ReadDirect_UByte(VertexLoader* loader) +static void PosMtx_ReadDirect_UByte(VertexLoader* loader) { u32 posmtx = DataReadU8() & 0x3f; if (loader->m_counter < 3) @@ -31,7 +31,7 @@ static void LOADERDECL PosMtx_ReadDirect_UByte(VertexLoader* loader) PRIM_LOG("posmtx: %d, ", posmtx); } -static void LOADERDECL TexMtx_ReadDirect_UByte(VertexLoader* loader) +static void TexMtx_ReadDirect_UByte(VertexLoader* loader) { loader->m_curtexmtx[loader->m_texmtxread] = DataReadU8() & 0x3f; @@ -39,25 +39,25 @@ static void LOADERDECL TexMtx_ReadDirect_UByte(VertexLoader* loader) loader->m_texmtxread++; } -static void LOADERDECL TexMtx_Write_Float(VertexLoader* loader) +static void TexMtx_Write_Float(VertexLoader* loader) { DataWrite(float(loader->m_curtexmtx[loader->m_texmtxwrite++])); } -static void LOADERDECL TexMtx_Write_Float2(VertexLoader* loader) +static void TexMtx_Write_Float2(VertexLoader* loader) { DataWrite(0.f); DataWrite(float(loader->m_curtexmtx[loader->m_texmtxwrite++])); } -static void LOADERDECL TexMtx_Write_Float3(VertexLoader* loader) +static void TexMtx_Write_Float3(VertexLoader* loader) { DataWrite(0.f); DataWrite(0.f); DataWrite(float(loader->m_curtexmtx[loader->m_texmtxwrite++])); } -static void LOADERDECL SkipVertex(VertexLoader* loader) +static void SkipVertex(VertexLoader* loader) { if (loader->m_vertexSkip) { diff --git a/Source/Core/VideoCommon/VertexLoader.h b/Source/Core/VideoCommon/VertexLoader.h index 50ece53095..c68614f0d8 100644 --- a/Source/Core/VideoCommon/VertexLoader.h +++ b/Source/Core/VideoCommon/VertexLoader.h @@ -18,14 +18,9 @@ #include "VideoCommon/VertexLoaderBase.h" #include "VideoCommon/VertexLoaderUtils.h" -#ifdef WIN32 -#define LOADERDECL __cdecl -#else -#define LOADERDECL -#endif class VertexLoader; -typedef void (LOADERDECL *TPipelineFunction)(VertexLoader* loader); +typedef void (*TPipelineFunction)(VertexLoader* loader); class VertexLoader : public VertexLoaderBase { diff --git a/Source/Core/VideoCommon/VertexLoader_Color.cpp b/Source/Core/VideoCommon/VertexLoader_Color.cpp index cf9ca88280..df9d814357 100644 --- a/Source/Core/VideoCommon/VertexLoader_Color.cpp +++ b/Source/Core/VideoCommon/VertexLoader_Color.cpp @@ -67,32 +67,32 @@ __forceinline u32 _Read32(const u8 *addr) } -void LOADERDECL Color_ReadDirect_24b_888(VertexLoader* loader) +void Color_ReadDirect_24b_888(VertexLoader* loader) { _SetCol(loader, _Read24(DataGetPosition())); DataSkip(3); } -void LOADERDECL Color_ReadDirect_32b_888x(VertexLoader* loader) +void Color_ReadDirect_32b_888x(VertexLoader* loader) { _SetCol(loader, _Read24(DataGetPosition())); DataSkip(4); } -void LOADERDECL Color_ReadDirect_16b_565(VertexLoader* loader) +void Color_ReadDirect_16b_565(VertexLoader* loader) { _SetCol565(loader, DataReadU16()); } -void LOADERDECL Color_ReadDirect_16b_4444(VertexLoader* loader) +void Color_ReadDirect_16b_4444(VertexLoader* loader) { _SetCol4444(loader, *(u16*)DataGetPosition()); DataSkip(2); } -void LOADERDECL Color_ReadDirect_24b_6666(VertexLoader* loader) +void Color_ReadDirect_24b_6666(VertexLoader* loader) { _SetCol6666(loader, Common::swap32(DataGetPosition() - 1)); DataSkip(3); } -void LOADERDECL Color_ReadDirect_32b_8888(VertexLoader* loader) +void Color_ReadDirect_32b_8888(VertexLoader* loader) { _SetCol(loader, DataReadU32Unswapped()); } @@ -146,16 +146,16 @@ void Color_ReadIndex_32b_8888(VertexLoader* loader) _SetCol(loader, _Read32(iAddress)); } -void LOADERDECL Color_ReadIndex8_16b_565(VertexLoader* loader) { Color_ReadIndex_16b_565(loader); } -void LOADERDECL Color_ReadIndex8_24b_888(VertexLoader* loader) { Color_ReadIndex_24b_888(loader); } -void LOADERDECL Color_ReadIndex8_32b_888x(VertexLoader* loader) { Color_ReadIndex_32b_888x(loader); } -void LOADERDECL Color_ReadIndex8_16b_4444(VertexLoader* loader) { Color_ReadIndex_16b_4444(loader); } -void LOADERDECL Color_ReadIndex8_24b_6666(VertexLoader* loader) { Color_ReadIndex_24b_6666(loader); } -void LOADERDECL Color_ReadIndex8_32b_8888(VertexLoader* loader) { Color_ReadIndex_32b_8888(loader); } +void Color_ReadIndex8_16b_565(VertexLoader* loader) { Color_ReadIndex_16b_565(loader); } +void Color_ReadIndex8_24b_888(VertexLoader* loader) { Color_ReadIndex_24b_888(loader); } +void Color_ReadIndex8_32b_888x(VertexLoader* loader) { Color_ReadIndex_32b_888x(loader); } +void Color_ReadIndex8_16b_4444(VertexLoader* loader) { Color_ReadIndex_16b_4444(loader); } +void Color_ReadIndex8_24b_6666(VertexLoader* loader) { Color_ReadIndex_24b_6666(loader); } +void Color_ReadIndex8_32b_8888(VertexLoader* loader) { Color_ReadIndex_32b_8888(loader); } -void LOADERDECL Color_ReadIndex16_16b_565(VertexLoader* loader) { Color_ReadIndex_16b_565(loader); } -void LOADERDECL Color_ReadIndex16_24b_888(VertexLoader* loader) { Color_ReadIndex_24b_888(loader); } -void LOADERDECL Color_ReadIndex16_32b_888x(VertexLoader* loader) { Color_ReadIndex_32b_888x(loader); } -void LOADERDECL Color_ReadIndex16_16b_4444(VertexLoader* loader) { Color_ReadIndex_16b_4444(loader); } -void LOADERDECL Color_ReadIndex16_24b_6666(VertexLoader* loader) { Color_ReadIndex_24b_6666(loader); } -void LOADERDECL Color_ReadIndex16_32b_8888(VertexLoader* loader) { Color_ReadIndex_32b_8888(loader); } +void Color_ReadIndex16_16b_565(VertexLoader* loader) { Color_ReadIndex_16b_565(loader); } +void Color_ReadIndex16_24b_888(VertexLoader* loader) { Color_ReadIndex_24b_888(loader); } +void Color_ReadIndex16_32b_888x(VertexLoader* loader) { Color_ReadIndex_32b_888x(loader); } +void Color_ReadIndex16_16b_4444(VertexLoader* loader) { Color_ReadIndex_16b_4444(loader); } +void Color_ReadIndex16_24b_6666(VertexLoader* loader) { Color_ReadIndex_24b_6666(loader); } +void Color_ReadIndex16_32b_8888(VertexLoader* loader) { Color_ReadIndex_32b_8888(loader); } diff --git a/Source/Core/VideoCommon/VertexLoader_Color.h b/Source/Core/VideoCommon/VertexLoader_Color.h index 6bf21e548f..98eb1ef4e5 100644 --- a/Source/Core/VideoCommon/VertexLoader_Color.h +++ b/Source/Core/VideoCommon/VertexLoader_Color.h @@ -8,23 +8,23 @@ class VertexLoader; -void LOADERDECL Color_ReadDirect_24b_888(VertexLoader* loader); -void LOADERDECL Color_ReadDirect_32b_888x(VertexLoader* loader); -void LOADERDECL Color_ReadDirect_16b_565(VertexLoader* loader); -void LOADERDECL Color_ReadDirect_16b_4444(VertexLoader* loader); -void LOADERDECL Color_ReadDirect_24b_6666(VertexLoader* loader); -void LOADERDECL Color_ReadDirect_32b_8888(VertexLoader* loader); +void Color_ReadDirect_24b_888(VertexLoader* loader); +void Color_ReadDirect_32b_888x(VertexLoader* loader); +void Color_ReadDirect_16b_565(VertexLoader* loader); +void Color_ReadDirect_16b_4444(VertexLoader* loader); +void Color_ReadDirect_24b_6666(VertexLoader* loader); +void Color_ReadDirect_32b_8888(VertexLoader* loader); -void LOADERDECL Color_ReadIndex8_16b_565(VertexLoader* loader); -void LOADERDECL Color_ReadIndex8_24b_888(VertexLoader* loader); -void LOADERDECL Color_ReadIndex8_32b_888x(VertexLoader* loader); -void LOADERDECL Color_ReadIndex8_16b_4444(VertexLoader* loader); -void LOADERDECL Color_ReadIndex8_24b_6666(VertexLoader* loader); -void LOADERDECL Color_ReadIndex8_32b_8888(VertexLoader* loader); +void Color_ReadIndex8_16b_565(VertexLoader* loader); +void Color_ReadIndex8_24b_888(VertexLoader* loader); +void Color_ReadIndex8_32b_888x(VertexLoader* loader); +void Color_ReadIndex8_16b_4444(VertexLoader* loader); +void Color_ReadIndex8_24b_6666(VertexLoader* loader); +void Color_ReadIndex8_32b_8888(VertexLoader* loader); -void LOADERDECL Color_ReadIndex16_16b_565(VertexLoader* loader); -void LOADERDECL Color_ReadIndex16_24b_888(VertexLoader* loader); -void LOADERDECL Color_ReadIndex16_32b_888x(VertexLoader* loader); -void LOADERDECL Color_ReadIndex16_16b_4444(VertexLoader* loader); -void LOADERDECL Color_ReadIndex16_24b_6666(VertexLoader* loader); -void LOADERDECL Color_ReadIndex16_32b_8888(VertexLoader* loader); +void Color_ReadIndex16_16b_565(VertexLoader* loader); +void Color_ReadIndex16_24b_888(VertexLoader* loader); +void Color_ReadIndex16_32b_888x(VertexLoader* loader); +void Color_ReadIndex16_16b_4444(VertexLoader* loader); +void Color_ReadIndex16_24b_6666(VertexLoader* loader); +void Color_ReadIndex16_32b_8888(VertexLoader* loader); diff --git a/Source/Core/VideoCommon/VertexLoader_Normal.cpp b/Source/Core/VideoCommon/VertexLoader_Normal.cpp index 939b902a9d..615a09c3a9 100644 --- a/Source/Core/VideoCommon/VertexLoader_Normal.cpp +++ b/Source/Core/VideoCommon/VertexLoader_Normal.cpp @@ -56,7 +56,7 @@ __forceinline void ReadIndirect(const T* data) template struct Normal_Direct { - static void LOADERDECL function(VertexLoader* loader) + static void function(VertexLoader* loader) { auto const source = reinterpret_cast(DataGetPosition()); ReadIndirect(source); @@ -80,7 +80,7 @@ __forceinline void Normal_Index_Offset() template struct Normal_Index { - static void LOADERDECL function(VertexLoader* loader) + static void function(VertexLoader* loader) { Normal_Index_Offset(); } @@ -91,7 +91,7 @@ struct Normal_Index template struct Normal_Index_Indices3 { - static void LOADERDECL function(VertexLoader* loader) + static void function(VertexLoader* loader) { Normal_Index_Offset(); Normal_Index_Offset(); diff --git a/Source/Core/VideoCommon/VertexLoader_Position.cpp b/Source/Core/VideoCommon/VertexLoader_Position.cpp index fd17fbf4d7..906cf61d71 100644 --- a/Source/Core/VideoCommon/VertexLoader_Position.cpp +++ b/Source/Core/VideoCommon/VertexLoader_Position.cpp @@ -24,7 +24,7 @@ float PosScale(float val, float scale) } template -void LOADERDECL Pos_ReadDirect(VertexLoader* loader) +void Pos_ReadDirect(VertexLoader* loader) { static_assert(N <= 3, "N > 3 is not sane!"); auto const scale = loader->m_posScale; @@ -45,7 +45,7 @@ void LOADERDECL Pos_ReadDirect(VertexLoader* loader) } template -void LOADERDECL Pos_ReadIndex(VertexLoader* loader) +void Pos_ReadIndex(VertexLoader* loader) { static_assert(std::is_unsigned::value, "Only unsigned I is sane!"); static_assert(N <= 3, "N > 3 is not sane!"); diff --git a/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp b/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp index 7904a5ce88..28a9a33871 100644 --- a/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp +++ b/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp @@ -28,7 +28,7 @@ __forceinline void LOG_TEX<2>() // PRIM_LOG("tex: %f %f, ", ((float*)g_vertex_manager_write_ptr)[-2], ((float*)g_vertex_manager_write_ptr)[-1]); } -static void LOADERDECL TexCoord_Read_Dummy(VertexLoader* loader) +static void TexCoord_Read_Dummy(VertexLoader* loader) { loader->m_tcIndex++; } @@ -46,7 +46,7 @@ float TCScale(float val, float scale) } template -void LOADERDECL TexCoord_ReadDirect(VertexLoader* loader) +void TexCoord_ReadDirect(VertexLoader* loader) { auto const scale = loader->m_tcScale[loader->m_tcIndex]; DataReader dst(g_vertex_manager_write_ptr, nullptr); @@ -63,7 +63,7 @@ void LOADERDECL TexCoord_ReadDirect(VertexLoader* loader) } template -void LOADERDECL TexCoord_ReadIndex(VertexLoader* loader) +void TexCoord_ReadIndex(VertexLoader* loader) { static_assert(std::is_unsigned::value, "Only unsigned I is sane!");