mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
VertexLoaderX64: Use EnumMap for normal scales
This commit is contained in:
parent
53ee1b50fe
commit
5cc2f7729e
@ -459,8 +459,9 @@ void VertexLoaderX64::GenerateVertexLoader()
|
|||||||
|
|
||||||
if (m_VtxDesc.low.Normal != VertexComponentFormat::NotPresent)
|
if (m_VtxDesc.low.Normal != VertexComponentFormat::NotPresent)
|
||||||
{
|
{
|
||||||
static const u8 map[8] = {7, 6, 15, 14};
|
static constexpr Common::EnumMap<u8, static_cast<ComponentFormat>(7)> SCALE_MAP = {7, 6, 15, 14,
|
||||||
const u8 scaling_exponent = map[u32(m_VtxAttr.g0.NormalFormat.Value())];
|
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;
|
const int limit = m_VtxAttr.g0.NormalElements == NormalComponentCount::NTB ? 3 : 1;
|
||||||
|
|
||||||
for (int i = 0; i < limit; i++)
|
for (int i = 0; i < limit; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user