From f57517f1a05db1790f853bf43d6093c19478b4ce Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Sat, 30 May 2015 00:42:45 +1200 Subject: Clean up cached_arraybases. Update VideoSW to new scheme. Move ownership of cached_arraybases from CPMemory to VertexLoaderManager to better match it usage. --- Source/UnitTests/VideoCommon/VertexLoaderTest.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Source/UnitTests/VideoCommon/VertexLoaderTest.cpp') 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(i); else Input(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(1); Input(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; } -- cgit v1.2.3