summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoaderManager.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-08-01 23:42:15 -0700
committerPierre Bourdon <delroth@gmail.com>2014-08-02 09:34:39 -0700
commit6f715a1fbefa6d1bdd9894bf88016ea92fa635b7 (patch)
treedbfa1a2f1cc91bc7a6f67dd2c7821739a10a32fc /Source/Core/VideoCommon/VertexLoaderManager.cpp
parent8b26d7bf1ef478ff2f06d3cf0b0712418d1a8627 (diff)
VertexLoader: Remove more global state dependencies (this time IndexGenerator and VertexManager)
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoaderManager.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp
index d5e74a0e11..d94af17360 100644
--- a/Source/Core/VideoCommon/VertexLoaderManager.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp
@@ -9,6 +9,7 @@
#include "Core/HW/Memmap.h"
+#include "VideoCommon/IndexGenerator.h"
#include "VideoCommon/Statistics.h"
#include "VideoCommon/VertexLoader.h"
#include "VideoCommon/VertexLoaderManager.h"
@@ -152,7 +153,15 @@ void RunVertices(int vtx_attr_group, int primitive, int count)
VertexManager::Flush();
s_current_vtx_fmt = required_vtx_fmt;
- RefreshLoader(vtx_attr_group)->RunVertices(g_VtxAttr[vtx_attr_group], primitive, count);
+ VertexManager::PrepareForAdditionalData(primitive, count,
+ loader->GetNativeVertexDeclaration().stride);
+
+ loader->RunVertices(g_VtxAttr[vtx_attr_group], primitive, count);
+
+ IndexGenerator::AddIndices(primitive, count);
+
+ ADDSTAT(stats.thisFrame.numPrims, count);
+ INCSTAT(stats.thisFrame.numPrimitiveJoins);
}
int GetVertexSize(int vtx_attr_group)