summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_TextCoord.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader_TextCoord.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp b/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp
index 8acebd9213..7889e2abcb 100644
--- a/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp
+++ b/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp
@@ -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(VertexManager::s_pCurBufferPointer, 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(&VertexManager::s_pCurBufferPointer);
+ 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(VertexManager::s_pCurBufferPointer, nullptr);
for (int i = 0; i != N; ++i)
dst.Write(TCScale(Common::FromBigEndian(data[i]), scale));
+ dst.WritePointer(&VertexManager::s_pCurBufferPointer);
LOG_TEX<N>();
++tcIndex;
}