diff options
| author | Rodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com> | 2010-05-04 14:43:30 +0000 |
|---|---|---|
| committer | Rodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com> | 2010-05-04 14:43:30 +0000 |
| commit | 0ea01d84628c4779a801d74bd01ce9006fe0372a (patch) | |
| tree | 03c3b6e940e517c1d7e9b4457f618a987bbbd96b /Source/Core/VideoCommon/Src/VertexLoader.cpp | |
| parent | a8659054acf6d48610ba59c4650c44b145a1f895 (diff) | |
fast commit :
make native mips loading an option to prevent performance lost in game that not need this functionality.( thanks to dorian.fevrier for point the performance lost.)
added a patch from pierre@pirsoft.de to avoid vertex drops when index array is full in opengl implementation that do not support large index arrays
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5432 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/VertexLoader.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/VertexLoader.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexLoader.cpp b/Source/Core/VideoCommon/Src/VertexLoader.cpp index a2a70483c6..5981fde36d 100644 --- a/Source/Core/VideoCommon/Src/VertexLoader.cpp +++ b/Source/Core/VideoCommon/Src/VertexLoader.cpp @@ -602,9 +602,12 @@ void VertexLoader::RunVertices(int vtx_attr_group, int primitive, int count) int startv = 0, extraverts = 0; int v = 0; + int remainingVerts2 = VertexManager::GetRemainingVertices(primitive); while (v < count) { int remainingVerts = VertexManager::GetRemainingSize() / native_stride; + if (remainingVerts2 - v + startv < remainingVerts) + remainingVerts = remainingVerts2 - v + startv; if (remainingVerts < granularity) { INCSTAT(stats.thisFrame.numBufferSplits); // This buffer full - break current primitive and flush, to switch to the next buffer. @@ -612,6 +615,7 @@ void VertexLoader::RunVertices(int vtx_attr_group, int primitive, int count) if (v - startv > 0) VertexManager::AddVertices(primitive, v - startv + extraverts); VertexManager::Flush(); + remainingVerts2 = VertexManager::GetRemainingVertices(primitive); // Why does this need to be so complicated? switch (primitive) { case 3: // triangle strip, copy last two vertices |
