Index: tests/GLProgramsTest.cpp |
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp |
index fe17f889457922309e1fa4d01b1804537931f9de..13d0d2ee5be91f8e45fc077a24ef476c46e87cd3 100644 |
--- a/tests/GLProgramsTest.cpp |
+++ b/tests/GLProgramsTest.cpp |
@@ -78,6 +78,7 @@ void GrGLProgramDesc::setRandom(SkRandom* random, |
bool dstRead = false; |
bool fragPos = false; |
+ bool vertexCode = false; |
int numStages = numColorStages + numCoverageStages; |
for (int s = 0; s < numStages; ++s) { |
const GrBackendEffectFactory& factory = (*stages[s]->getEffect())->getFactory(); |
@@ -89,6 +90,9 @@ void GrGLProgramDesc::setRandom(SkRandom* random, |
if ((*stages[s]->getEffect())->willReadFragmentPosition()) { |
fragPos = true; |
} |
+ if ((*stages[s]->getEffect())->hasVertexCode()) { |
+ vertexCode = true; |
+ } |
} |
if (dstRead) { |
@@ -103,6 +107,11 @@ void GrGLProgramDesc::setRandom(SkRandom* random, |
header->fFragPosKey = 0; |
} |
+ header->fHasVertexCode = vertexCode || |
+ useLocalCoords || |
+ kAttribute_ColorInput == header->fColorInput || |
+ kAttribute_ColorInput == header->fCoverageInput; |
+ |
CoverageOutput coverageOutput; |
bool illegalCoverageOutput; |
do { |