diff options
| author | Markus Wick <markus+github@selfnet.de> | 2015-05-31 23:26:55 +0200 |
|---|---|---|
| committer | Markus Wick <markus+github@selfnet.de> | 2015-05-31 23:26:55 +0200 |
| commit | aa2576a2c7ebc589a594780726a884df1ad95d89 (patch) | |
| tree | 97a97507b306cd838efa76f68fa0ee690899adea /Source/Core/VideoCommon/VertexLoader_Normal.cpp | |
| parent | ac1f3ef09957bc863737541b23ada77195bf41aa (diff) | |
| parent | 7df69829732745d98b843d37d68a65920d1d883b (diff) | |
Merge pull request #2480 from phire/GamesDoWeirdShit
Fix invalid pointer errors in Burnout 2.
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_Normal.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoader_Normal.cpp | 3 |
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); } |
