Index: src/gpu/gl/GrGpuGL_program.cpp |
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp |
index 9e1b6f5c2ba294aa10f75244a47de8ba1983b1d1..45181c25a8d87acabfc186d462cd831eb759819d 100644 |
--- a/src/gpu/gl/GrGpuGL_program.cpp |
+++ b/src/gpu/gl/GrGpuGL_program.cpp |
@@ -353,9 +353,12 @@ void GrGpuGL::setupGeometry(const DrawInfo& info, size_t* indexOffsetInBytes) { |
uint32_t usedAttribArraysMask = 0; |
const GrVertexAttrib* vertexAttrib = this->getDrawState().getVertexAttribs(); |
+ bool canIgnoreColorAttrib = this->getDrawState().canIgnoreColorAttribute(); |
+ |
for (int vertexAttribIndex = 0; vertexAttribIndex < vertexAttribCount; |
++vertexAttribIndex, ++vertexAttrib) { |
+ if (kColor_GrVertexAttribBinding != vertexAttrib->fBinding || !canIgnoreColorAttrib) { |
usedAttribArraysMask |= (1 << vertexAttribIndex); |
GrVertexAttribType attribType = vertexAttrib->fType; |
attribState->set(this, |
@@ -367,6 +370,7 @@ void GrGpuGL::setupGeometry(const DrawInfo& info, size_t* indexOffsetInBytes) { |
stride, |
reinterpret_cast<GrGLvoid*>( |
vertexOffsetInBytes + vertexAttrib->fOffset)); |
+ } |
} |
attribState->disableUnusedArrays(this, usedAttribArraysMask); |
} |