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/UnitTests/VideoCommon/VertexLoaderTest.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/UnitTests/VideoCommon/VertexLoaderTest.cpp')
| -rw-r--r-- | Source/UnitTests/VideoCommon/VertexLoaderTest.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp b/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp index 8c4ea12964..84e1029e2e 100644 --- a/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp +++ b/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp @@ -16,6 +16,7 @@ #include "VideoCommon/DataReader.h" #include "VideoCommon/OpcodeDecoding.h" #include "VideoCommon/VertexLoaderBase.h" +#include "VideoCommon/VertexLoaderManager.h" TEST(VertexLoaderUID, UniqueEnough) { @@ -151,7 +152,7 @@ TEST_P(VertexLoaderParamTest, PositionAll) Input<u8>(i); else Input<u16>(i); - cached_arraybases[ARRAY_POSITION] = m_src.GetPointer(); + VertexLoaderManager::cached_arraybases[ARRAY_POSITION] = m_src.GetPointer(); g_main_cp_state.array_strides[ARRAY_POSITION] = elements * elem_size; } CreateAndCheckSizes(input_size, elements * sizeof(float)); @@ -192,7 +193,7 @@ TEST_F(VertexLoaderTest, PositionIndex16FloatXY) m_vtx_attr.g0.PosFormat = FORMAT_FLOAT; CreateAndCheckSizes(sizeof(u16), 2 * sizeof(float)); Input<u16>(1); Input<u16>(0); - cached_arraybases[ARRAY_POSITION] = m_src.GetPointer(); + VertexLoaderManager::cached_arraybases[ARRAY_POSITION] = m_src.GetPointer(); g_main_cp_state.array_strides[ARRAY_POSITION] = sizeof(float); // ;) Input(1.f); Input(2.f); Input(3.f); RunVertices(2); @@ -297,9 +298,9 @@ TEST_F(VertexLoaderTest, LargeFloatVertexSpeed) CreateAndCheckSizes(33, 156); - for (int i = 0; i < 16; i++) + for (int i = 0; i < 12; i++) { - cached_arraybases[i] = m_src.GetPointer(); + VertexLoaderManager::cached_arraybases[i] = m_src.GetPointer(); g_main_cp_state.array_strides[i] = 129; } |
