summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader_Normal.cpp
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2015-05-30 00:42:45 +1200
committerScott Mansell <phiren@gmail.com>2015-05-30 04:09:27 +1200
commitf57517f1a05db1790f853bf43d6093c19478b4ce (patch)
tree4874138fabc5e0c892013d6151e6d19dd2b2c1ba /Source/Core/VideoCommon/VertexLoader_Normal.cpp
parent6d916762fb52a85aa086ef0cb6516cc63fbe775b (diff)
Clean up cached_arraybases. Update VideoSW to new scheme.
Move ownership of cached_arraybases from CPMemory to VertexLoaderManager to better match it usage.
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_Normal.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader_Normal.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader_Normal.cpp b/Source/Core/VideoCommon/VertexLoader_Normal.cpp
index 68f98dac4a..939b902a9d 100644
--- a/Source/Core/VideoCommon/VertexLoader_Normal.cpp
+++ b/Source/Core/VideoCommon/VertexLoader_Normal.cpp
@@ -8,6 +8,7 @@
#include "Common/CommonTypes.h"
#include "VideoCommon/VertexLoader.h"
#include "VideoCommon/VertexLoader_Normal.h"
+#include "VideoCommon/VertexLoaderManager.h"
#include "VideoCommon/VertexManagerBase.h"
#include "VideoCommon/VideoCommon.h"
@@ -71,7 +72,7 @@ __forceinline void Normal_Index_Offset()
static_assert(std::is_unsigned<I>::value, "Only unsigned I is sane!");
auto const index = DataRead<I>();
- auto const data = reinterpret_cast<const T*>(cached_arraybases[ARRAY_NORMAL]
+ auto const data = reinterpret_cast<const T*>(VertexLoaderManager::cached_arraybases[ARRAY_NORMAL]
+ (index * g_main_cp_state.array_strides[ARRAY_NORMAL]) + sizeof(T) * 3 * Offset);
ReadIndirect<T, N * 3>(data);
}