summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader_Position.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_Position.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader_Position.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader_Position.cpp b/Source/Core/VideoCommon/VertexLoader_Position.cpp
index 6c50dd1560..4dacfd6042 100644
--- a/Source/Core/VideoCommon/VertexLoader_Position.cpp
+++ b/Source/Core/VideoCommon/VertexLoader_Position.cpp
@@ -75,12 +75,14 @@ void LOADERDECL Pos_ReadDirect()
{
static_assert(N <= 3, "N > 3 is not sane!");
auto const scale = posScale[0];
- DataWriter dst;
- DataReader src;
+ DataReader dst(VertexManager::s_pCurBufferPointer, nullptr);
+ DataReader src(g_video_buffer_read_ptr, nullptr);
for (int i = 0; i < 3; ++i)
dst.Write(i<N ? PosScale(src.Read<T>(), scale) : 0.f);
+ dst.WritePointer(&VertexManager::s_pCurBufferPointer);
+ src.WritePointer(&g_video_buffer_read_ptr);
LOG_VTX();
}
@@ -93,11 +95,12 @@ void LOADERDECL Pos_ReadIndex()
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];
- DataWriter dst;
+ DataReader dst(VertexManager::s_pCurBufferPointer, nullptr);
for (int i = 0; i < 3; ++i)
dst.Write(i<N ? PosScale(Common::FromBigEndian(data[i]), scale) : 0.f);
+ dst.WritePointer(&VertexManager::s_pCurBufferPointer);
LOG_VTX();
}