summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp
index c2d3c1bd29..89965f8710 100644
--- a/Source/Core/VideoCommon/VertexLoader.cpp
+++ b/Source/Core/VideoCommon/VertexLoader.cpp
@@ -149,9 +149,16 @@ void VertexLoader::CompileVertexTranslator()
VertexLoader_Color::GetFunction(m_VtxDesc.low.Color[i], m_VtxAttr.GetColorFormat(i));
if (pFunc != nullptr)
+ {
WriteCall(pFunc);
+ }
else
+ {
ASSERT(m_VtxDesc.low.Color[i] == VertexComponentFormat::NotPresent);
+ // Keep colIndex in sync if color 0 is absent but color 1 is present
+ if (i == 0 && m_VtxDesc.low.Color[1] != VertexComponentFormat::NotPresent)
+ WriteCall(VertexLoader_Color::GetDummyFunction());
+ }
if (m_VtxDesc.low.Color[i] != VertexComponentFormat::NotPresent)
{