summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader_Position.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2014-01-21 19:23:07 +0100
committerdegasus <wickmarkus@web.de>2014-01-21 19:23:07 +0100
commit0b97b33ceb58cd72a9586c438f39866ec032d9a4 (patch)
treee518a492ae97f0dda68acecd3a1d57cff03dd486 /Source/Core/VideoCommon/VertexLoader_Position.cpp
parentc613868f5788b59855ff564440a12839717aa3d2 (diff)
VertexLoader: inline destionation buffer
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_Position.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader_Position.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader_Position.cpp b/Source/Core/VideoCommon/VertexLoader_Position.cpp
index e6836ddf6a..6163272fb1 100644
--- a/Source/Core/VideoCommon/VertexLoader_Position.cpp
+++ b/Source/Core/VideoCommon/VertexLoader_Position.cpp
@@ -77,9 +77,12 @@ void LOADERDECL Pos_ReadDirect()
{
static_assert(N <= 3, "N > 3 is not sane!");
auto const scale = posScale;
+ auto dst = VertexManager::s_pCurBufferPointer;
for (int i = 0; i < 3; ++i)
- DataWrite(i<N ? PosScale(DataRead<T>(), scale) : 0.f);
+ DataWrite(dst, i<N ? PosScale(DataRead<T>(), scale) : 0.f);
+
+ VertexManager::s_pCurBufferPointer = dst;
LOG_VTX();
}
@@ -93,9 +96,12 @@ void LOADERDECL Pos_ReadIndex()
auto const index = DataRead<I>();
auto const data = reinterpret_cast<const T*>(cached_arraybases[ARRAY_POSITION] + (index * arraystrides[ARRAY_POSITION]));
auto const scale = posScale;
+ auto dst = VertexManager::s_pCurBufferPointer;
for (int i = 0; i < 3; ++i)
- DataWrite(i<N ? PosScale(Common::FromBigEndian(data[i]), scale) : 0.f);
+ DataWrite(dst, i<N ? PosScale(Common::FromBigEndian(data[i]), scale) : 0.f);
+
+ VertexManager::s_pCurBufferPointer = dst;
LOG_VTX();
}