diff options
| author | degasus <wickmarkus@web.de> | 2014-12-13 10:57:46 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2014-12-21 14:13:04 +0100 |
| commit | 7c486a8c243c3bb223b1d31aab34bf039c6a02a1 (patch) | |
| tree | 741f00ba732722c97c0f51ecda9bb447648c1492 /Source/Core/VideoCommon/VertexLoader_Position.cpp | |
| parent | 7edf6ec4e4506be5bf575eee5f33287be19ae372 (diff) | |
VertexLoader: Add a VertexLoader pointer to each function call
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_Position.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoader_Position.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader_Position.cpp b/Source/Core/VideoCommon/VertexLoader_Position.cpp index 60a6115ee0..c0fac7ef93 100644 --- a/Source/Core/VideoCommon/VertexLoader_Position.cpp +++ b/Source/Core/VideoCommon/VertexLoader_Position.cpp @@ -71,10 +71,10 @@ float PosScale(float val, float scale) } template <typename T, int N> -void LOADERDECL Pos_ReadDirect() +void LOADERDECL Pos_ReadDirect(VertexLoader* loader) { static_assert(N <= 3, "N > 3 is not sane!"); - auto const scale = posScale[0]; + auto const scale = loader->m_posScale[0];; DataReader dst(g_vertex_manager_write_ptr, nullptr); DataReader src(g_video_buffer_read_ptr, nullptr); @@ -87,14 +87,14 @@ void LOADERDECL Pos_ReadDirect() } template <typename I, typename T, int N> -void LOADERDECL Pos_ReadIndex() +void LOADERDECL Pos_ReadIndex(VertexLoader* loader) { static_assert(std::is_unsigned<I>::value, "Only unsigned I is sane!"); static_assert(N <= 3, "N > 3 is not sane!"); auto const index = DataRead<I>(); auto const data = reinterpret_cast<const T*>(cached_arraybases[ARRAY_POSITION] + (index * g_main_cp_state.array_strides[ARRAY_POSITION])); - auto const scale = posScale[0]; + auto const scale = loader->m_posScale[0]; DataReader dst(g_vertex_manager_write_ptr, nullptr); for (int i = 0; i < 3; ++i) @@ -106,21 +106,21 @@ void LOADERDECL Pos_ReadIndex() #if _M_SSE >= 0x301 template <typename T, bool three> -void LOADERDECL Pos_ReadDirect_SSSE3() +void LOADERDECL Pos_ReadDirect_SSSE3(VertexLoader* loader) { const T* pData = reinterpret_cast<const T*>(DataGetPosition()); - Vertex_Read_SSSE3<T, three, true>(pData, *(__m128*)posScale); + Vertex_Read_SSSE3<T, three, true>(pData, *(__m128*)loader->m_posScale); DataSkip<(2 + three) * sizeof(T)>(); LOG_VTX(); } template <typename I, typename T, bool three> -void LOADERDECL Pos_ReadIndex_SSSE3() +void LOADERDECL Pos_ReadIndex_SSSE3(VertexLoader* loader) { static_assert(std::is_unsigned<I>::value, "Only unsigned I is sane!"); auto const index = DataRead<I>(); const T* pData = (const T*)(cached_arraybases[ARRAY_POSITION] + (index * g_main_cp_state.array_strides[ARRAY_POSITION])); - Vertex_Read_SSSE3<T, three, true>(pData, *(__m128*)posScale); + Vertex_Read_SSSE3<T, three, true>(pData, *(__m128*)loader->m_posScale); LOG_VTX(); } #endif |
