summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/VertexLoader.cpp
diff options
context:
space:
mode:
authorNolan Check <Nolan.Check@gmail.com>2009-07-30 20:29:52 +0000
committerNolan Check <Nolan.Check@gmail.com>2009-07-30 20:29:52 +0000
commit8ab4814d73215271f0baaccf5cc51e7eba2b9c17 (patch)
tree8e544de45d9bbe9533b5a1120ac35e14de26d37b /Source/Core/VideoCommon/Src/VertexLoader.cpp
parentdcae5938c9a9d9d27085746873788cfefbb6270e (diff)
Don't use lookup tables. It's better to use CPU registers and reduce memory accesses.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3909 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/VertexLoader.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/VertexLoader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexLoader.cpp b/Source/Core/VideoCommon/Src/VertexLoader.cpp
index d02b889c43..9fe3dc8768 100644
--- a/Source/Core/VideoCommon/Src/VertexLoader.cpp
+++ b/Source/Core/VideoCommon/Src/VertexLoader.cpp
@@ -619,10 +619,10 @@ void VertexLoader::RunVertices(int vtx_attr_group, int primitive, int count)
m_VtxAttr.texCoord[7].Frac = g_VtxAttr[vtx_attr_group].g2.Tex7Frac;
pVtxAttr = &m_VtxAttr;
- posScale = shiftLookup[m_VtxAttr.PosFrac];
+ posScale = 1.0f / float(1 << m_VtxAttr.PosFrac);
if (m_NativeFmt->m_components & VB_HAS_UVALL)
for (int i = 0; i < 8; i++)
- tcScale[i] = shiftLookup[m_VtxAttr.texCoord[i].Frac];
+ tcScale[i] = 1.0f / float(1 << m_VtxAttr.texCoord[i].Frac);
for (int i = 0; i < 2; i++)
colElements[i] = m_VtxAttr.color[i].Elements;