diff options
| author | Markus Wick <markus+github@selfnet.de> | 2014-12-10 06:53:11 +0100 |
|---|---|---|
| committer | Markus Wick <markus+github@selfnet.de> | 2014-12-10 06:53:11 +0100 |
| commit | 4c139ca7cc816489feffc0b6ee0a3f1a6d85060e (patch) | |
| tree | e16ae78d1428f5ae62e68541bc8fe46bd3693d34 /Source/Core/VideoCommon/VertexLoader_TextCoord.cpp | |
| parent | 57d2469d93ca6e2d3e0efe7c0efa85dfb95ed9c0 (diff) | |
| parent | e88e63adb36d649903a54740d9580a491cd6bf0d (diff) | |
Merge pull request #1609 from degasus/datareader
VideoCommon: Datareader
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_TextCoord.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoader_TextCoord.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp b/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp index 8acebd9213..002ec13e55 100644 --- a/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp +++ b/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp @@ -19,14 +19,14 @@ template <> __forceinline void LOG_TEX<1>() { // warning: mapping buffer should be disabled to use this - // PRIM_LOG("tex: %f, ", ((float*)VertexManager::s_pCurBufferPointer)[-1]); + // PRIM_LOG("tex: %f, ", ((float*)g_vertex_manager_write_ptr)[-1]); } template <> __forceinline void LOG_TEX<2>() { // warning: mapping buffer should be disabled to use this - // PRIM_LOG("tex: %f %f, ", ((float*)VertexManager::s_pCurBufferPointer)[-2], ((float*)VertexManager::s_pCurBufferPointer)[-1]); + // 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() @@ -50,12 +50,14 @@ template <typename T, int N> void LOADERDECL TexCoord_ReadDirect() { auto const scale = tcScale[tcIndex][0]; - DataWriter dst; - DataReader src; + DataReader dst(g_vertex_manager_write_ptr, nullptr); + DataReader src(g_video_buffer_read_ptr, nullptr); for (int i = 0; i != N; ++i) dst.Write(TCScale(src.Read<T>(), scale)); + dst.WritePointer(&g_vertex_manager_write_ptr); + src.WritePointer(&g_video_buffer_read_ptr); LOG_TEX<N>(); ++tcIndex; @@ -70,11 +72,12 @@ void LOADERDECL TexCoord_ReadIndex() auto const data = reinterpret_cast<const T*>(cached_arraybases[ARRAY_TEXCOORD0 + tcIndex] + (index * g_main_cp_state.array_strides[ARRAY_TEXCOORD0 + tcIndex])); auto const scale = tcScale[tcIndex][0]; - DataWriter dst; + DataReader dst(g_vertex_manager_write_ptr, nullptr); for (int i = 0; i != N; ++i) dst.Write(TCScale(Common::FromBigEndian(data[i]), scale)); + dst.WritePointer(&g_vertex_manager_write_ptr); LOG_TEX<N>(); ++tcIndex; } |
