diff options
| author | Tony Wasserka <neobrainx@gmail.com> | 2015-01-24 13:29:57 +0100 |
|---|---|---|
| committer | Tony Wasserka <neobrainx@gmail.com> | 2015-01-24 13:29:57 +0100 |
| commit | 43036af944e706ac38821561c2f3333a500e63f6 (patch) | |
| tree | 6c5b23ed4707d9af477143774dd86f9f9b9fe7be /Source/Core/VideoCommon/VertexLoaderManager.cpp | |
| parent | 4e9497cdb85ecbd088ca06fb501496aa0c8240a7 (diff) | |
| parent | 14baf038e70a598a6af1ce71719bb557425941f9 (diff) | |
Merge pull request #1812 from phire/real_zfreeze
Add proper zfreeze support.
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoaderManager.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoaderManager.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp index 786cb45a96..e0115a0d29 100644 --- a/Source/Core/VideoCommon/VertexLoaderManager.cpp +++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp @@ -149,19 +149,20 @@ int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bo if ((int)src.size() < size) return -1; - if (skip_drawing || (bpmem.genMode.cullmode == GenMode::CULL_ALL && primitive < 5)) - { - // if cull mode is CULL_ALL, ignore triangles and quads + if (skip_drawing) return size; - } // If the native vertex format changed, force a flush. if (loader->m_native_vertex_format != s_current_vtx_fmt) VertexManager::Flush(); s_current_vtx_fmt = loader->m_native_vertex_format; + // if cull mode is CULL_ALL, tell VertexManager to skip triangles and quads. + // They still need to go through vertex loading, because we need to calculate a zfreeze refrence slope. + bool cullall = (bpmem.genMode.cullmode == GenMode::CULL_ALL && primitive < 5); + DataReader dst = VertexManager::PrepareForAdditionalData(primitive, count, - loader->m_native_vtx_decl.stride); + loader->m_native_vtx_decl.stride, cullall); count = loader->RunVertices(primitive, count, src, dst); |
