diff options
| author | Lioncash <mathew1800@gmail.com> | 2014-08-04 23:51:59 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2014-08-04 23:51:59 -0400 |
| commit | e1701951b2840947a043274eb733708806249ad9 (patch) | |
| tree | 9bd836d627bdfed6974b7e08ffc8e0162a302f44 /Source/Core/VideoCommon/VertexLoaderManager.cpp | |
| parent | b7d44810811c4896b17d2ddd055244bece7dd8d8 (diff) | |
| parent | 16f180524cc1526e04cd91f33f74ca56f190bc06 (diff) | |
Merge pull request #739 from delroth/vertex-loader-fix
VertexLoader: do not prepare for vertices if we need to skip them
Fixes issue [7542](https://code.google.com/p/dolphin-emu/issues/detail?id=7542)
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoaderManager.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoaderManager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp index d94af17360..b538684b90 100644 --- a/Source/Core/VideoCommon/VertexLoaderManager.cpp +++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp @@ -9,6 +9,7 @@ #include "Core/HW/Memmap.h" +#include "VideoCommon/BPMemory.h" #include "VideoCommon/IndexGenerator.h" #include "VideoCommon/Statistics.h" #include "VideoCommon/VertexLoader.h" @@ -145,6 +146,13 @@ void RunVertices(int vtx_attr_group, int primitive, int count) return; VertexLoader* loader = RefreshLoader(vtx_attr_group); + if (bpmem.genMode.cullmode == GenMode::CULL_ALL && primitive < 5) + { + // if cull mode is CULL_ALL, ignore triangles and quads + DataSkip(count * loader->GetVertexSize()); + return; + } + // If the native vertex format changed, force a flush. NativeVertexFormat* required_vtx_fmt = GetNativeVertexFormat( loader->GetNativeVertexDeclaration(), |
