summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoaderARM64.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2022-07-14 19:27:44 -0700
committerPokechu22 <Pokechu022@gmail.com>2022-09-18 23:33:24 -0700
commitafe5adb74d4db1815e0aa20017f980314ca9027d (patch)
tree47fc44f95bb80e7ea8a8b7464216ca47f2f0bbe9 /Source/Core/VideoCommon/VertexLoaderARM64.cpp
parent200676f4e3ba96303b6951126dbbe1926adba337 (diff)
VertexLoaderARM64: Use EnumMap for normal scales
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoaderARM64.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoaderARM64.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderARM64.cpp b/Source/Core/VideoCommon/VertexLoaderARM64.cpp
index 9388c21a7b..f5cd7c27d5 100644
--- a/Source/Core/VideoCommon/VertexLoaderARM64.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderARM64.cpp
@@ -470,8 +470,9 @@ void VertexLoaderARM64::GenerateVertexLoader()
if (m_VtxDesc.low.Normal != VertexComponentFormat::NotPresent)
{
- static const u8 map[8] = {7, 6, 15, 14};
- const u8 scaling_exponent = map[u32(m_VtxAttr.g0.NormalFormat.Value())];
+ static constexpr Common::EnumMap<u8, static_cast<ComponentFormat>(7)> SCALE_MAP = {7, 6, 15, 14,
+ 0, 0, 0, 0};
+ const u8 scaling_exponent = SCALE_MAP[m_VtxAttr.g0.NormalFormat];
const int limit = m_VtxAttr.g0.NormalElements == NormalComponentCount::NTB ? 3 : 1;
s32 offset = -1;