From 9569c79ca20413b866206add51e249cbb18e462b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 30 May 2019 09:39:27 -0400 Subject: [PATCH] VertexLoader_TextCoord: Make lookup tables immutable Allows the compiler to place the data within the read-only segment. --- Source/Core/VideoCommon/VertexLoader_TextCoord.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp b/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp index 02bfc8922b..52723225f9 100644 --- a/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp +++ b/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp @@ -88,7 +88,7 @@ void TexCoord_ReadIndex(VertexLoader* loader) ++loader->m_tcIndex; } -TPipelineFunction tableReadTexCoord[4][8][2] = { +constexpr TPipelineFunction s_table_read_tex_coord[4][8][2] = { { { nullptr, @@ -179,7 +179,7 @@ TPipelineFunction tableReadTexCoord[4][8][2] = { }, }; -int tableReadTexCoordVertexSize[4][8][2] = { +constexpr int s_table_read_tex_coord_vertex_size[4][8][2] = { { {0, 0}, {0, 0}, @@ -214,13 +214,13 @@ int tableReadTexCoordVertexSize[4][8][2] = { unsigned int VertexLoader_TextCoord::GetSize(u64 _type, unsigned int _format, unsigned int _elements) { - return tableReadTexCoordVertexSize[_type][_format][_elements]; + return s_table_read_tex_coord_vertex_size[_type][_format][_elements]; } TPipelineFunction VertexLoader_TextCoord::GetFunction(u64 _type, unsigned int _format, unsigned int _elements) { - return tableReadTexCoord[_type][_format][_elements]; + return s_table_read_tex_coord[_type][_format][_elements]; } TPipelineFunction VertexLoader_TextCoord::GetDummyFunction()