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.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader_Position.cpp b/Source/Core/VideoCommon/VertexLoader_Position.cpp
index ed6b4587b3..fd17fbf4d7 100644
--- a/Source/Core/VideoCommon/VertexLoader_Position.cpp
+++ b/Source/Core/VideoCommon/VertexLoader_Position.cpp
@@ -32,7 +32,12 @@ void LOADERDECL Pos_ReadDirect(VertexLoader* loader)
DataReader src(g_video_buffer_read_ptr, nullptr);
for (int i = 0; i < N; ++i)
- dst.Write(PosScale(src.Read<T>(), scale));
+ {
+ float value = PosScale(src.Read<T>(), scale);
+ if (loader->m_counter < 3)
+ VertexLoaderManager::position_cache[loader->m_counter][i] = value;
+ dst.Write(value);
+ }
g_vertex_manager_write_ptr = dst.GetPointer();
g_video_buffer_read_ptr = src.GetPointer();
@@ -52,7 +57,12 @@ void LOADERDECL Pos_ReadIndex(VertexLoader* loader)
DataReader dst(g_vertex_manager_write_ptr, nullptr);
for (int i = 0; i < N; ++i)
- dst.Write(PosScale(Common::FromBigEndian(data[i]), scale));
+ {
+ float value = PosScale(Common::FromBigEndian(data[i]), scale);
+ if (loader->m_counter < 3)
+ VertexLoaderManager::position_cache[loader->m_counter][i] = value;
+ dst.Write(value);
+ }
g_vertex_manager_write_ptr = dst.GetPointer();
LOG_VTX();