summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2014-12-11 22:39:58 +0100
committerdegasus <wickmarkus@web.de>2014-12-21 13:47:42 +0100
commitec28a80e00ae6893b1a71c1e0538561df78665e5 (patch)
tree06926e784c89a8939975813bd3bfaed80436f7d5 /Source/Core/VideoCommon/VertexLoader.cpp
parent9b2909357bc4c8863c61dcf2e525889c70827844 (diff)
VideoLoader: remove VAT_*_FRACBITS
They are used to remove the flush amounts, but as we don't flush anymore on vertex loader changes (only on native vertex format right now), this optimization is now unneeded. This will allow us to hard code the frac factors within the vertex loaders.
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp
index f293564e85..2dea025d96 100644
--- a/Source/Core/VideoCommon/VertexLoader.cpp
+++ b/Source/Core/VideoCommon/VertexLoader.cpp
@@ -119,6 +119,7 @@ VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr)
VertexLoader_TextCoord::Init();
m_VtxDesc = vtx_desc;
+ m_vat = vtx_attr;
SetVAT(vtx_attr);
#ifdef USE_VERTEX_LOADER_JIT
@@ -444,21 +445,10 @@ void VertexLoader::WriteSetVariable(int bits, void *address, OpArg value)
}
#endif
-void VertexLoader::SetupRunVertices(const VAT& vat, int primitive, int const count)
+void VertexLoader::SetupRunVertices(int primitive, int const count)
{
m_numLoadedVertices += count;
- // Load position and texcoord scale factors.
- m_VtxAttr.PosFrac = vat.g0.PosFrac;
- m_VtxAttr.texCoord[0].Frac = vat.g0.Tex0Frac;
- m_VtxAttr.texCoord[1].Frac = vat.g1.Tex1Frac;
- m_VtxAttr.texCoord[2].Frac = vat.g1.Tex2Frac;
- m_VtxAttr.texCoord[3].Frac = vat.g1.Tex3Frac;
- m_VtxAttr.texCoord[4].Frac = vat.g2.Tex4Frac;
- m_VtxAttr.texCoord[5].Frac = vat.g2.Tex5Frac;
- m_VtxAttr.texCoord[6].Frac = vat.g2.Tex6Frac;
- m_VtxAttr.texCoord[7].Frac = vat.g2.Tex7Frac;
-
posScale[0] = posScale[1] = posScale[2] = posScale[3] = fractionTable[m_VtxAttr.PosFrac];
if (m_native_components & VB_HAS_UVALL)
for (int i = 0; i < 8; i++)
@@ -468,7 +458,7 @@ void VertexLoader::SetupRunVertices(const VAT& vat, int primitive, int const cou
// Prepare bounding box
if (!g_ActiveConfig.backend_info.bSupportsBBox)
- BoundingBox::Prepare(vat, primitive, m_VtxDesc, m_native_vtx_decl);
+ BoundingBox::Prepare(m_vat, primitive, m_VtxDesc, m_native_vtx_decl);
}
void VertexLoader::ConvertVertices ( int count )
@@ -491,11 +481,11 @@ void VertexLoader::ConvertVertices ( int count )
#endif
}
-int VertexLoader::RunVertices(const VAT& vat, int primitive, int count, DataReader src, DataReader dst)
+int VertexLoader::RunVertices(int primitive, int count, DataReader src, DataReader dst)
{
dst.WritePointer(&g_vertex_manager_write_ptr);
src.WritePointer(&g_video_buffer_read_ptr);
- SetupRunVertices(vat, primitive, count);
+ SetupRunVertices(primitive, count);
ConvertVertices(count);
return count;
}