From 1914087998bc296208355dc4b1b2553430b081b2 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Sun, 20 Jun 2021 13:47:57 -0700 Subject: Create and use CPArray enum class --- Source/UnitTests/VideoCommon/VertexLoaderTest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Source/UnitTests/VideoCommon/VertexLoaderTest.cpp') diff --git a/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp b/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp index 81b3e5ee53..e72fe28c29 100644 --- a/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp +++ b/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp @@ -174,8 +174,8 @@ TEST_P(VertexLoaderParamTest, PositionAll) Input(i); else Input(i); - VertexLoaderManager::cached_arraybases[ARRAY_POSITION] = m_src.GetPointer(); - g_main_cp_state.array_strides[ARRAY_POSITION] = elem_count * elem_size; + VertexLoaderManager::cached_arraybases[CPArray::Position] = m_src.GetPointer(); + g_main_cp_state.array_strides[CPArray::Position] = elem_count * elem_size; } CreateAndCheckSizes(input_size, elem_count * sizeof(float)); for (float value : values) @@ -243,8 +243,8 @@ TEST_F(VertexLoaderTest, PositionIndex16FloatXY) CreateAndCheckSizes(sizeof(u16), 2 * sizeof(float)); Input(1); Input(0); - VertexLoaderManager::cached_arraybases[ARRAY_POSITION] = m_src.GetPointer(); - g_main_cp_state.array_strides[ARRAY_POSITION] = sizeof(float); // ;) + VertexLoaderManager::cached_arraybases[CPArray::Position] = m_src.GetPointer(); + g_main_cp_state.array_strides[CPArray::Position] = sizeof(float); // ;) Input(1.f); Input(2.f); Input(3.f); @@ -357,8 +357,8 @@ TEST_F(VertexLoaderTest, LargeFloatVertexSpeed) for (int i = 0; i < NUM_VERTEX_COMPONENT_ARRAYS; i++) { - VertexLoaderManager::cached_arraybases[i] = m_src.GetPointer(); - g_main_cp_state.array_strides[i] = 129; + VertexLoaderManager::cached_arraybases[static_cast(i)] = m_src.GetPointer(); + g_main_cp_state.array_strides[static_cast(i)] = 129; } // This test is only done 100x in a row since it's ~20x slower using the -- cgit v1.2.3