Remove unused texture coordinate flags.
Currently we support 5 texture stages, each with 5 possible texture coordinate attributes.
However, we only ever use one explicit texture coordinate. This change removes all but one
(now named just "aTexCoord") of the possible explicit texture coordinates.
Review URL: https://codereview.appspot.com/7308094/
git-svn-id: http://skia.googlecode.com/svn/trunk@7737 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index d4873ca..0c660d9 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -57,14 +57,15 @@
fDualSrcOutput = kNone_DualSrcOutput;
}
+ bool useOnce = false;
for (int s = 0; s < GrDrawState::kNumStages; ++s) {
if (NULL != stages[s].getEffect()) {
const GrBackendEffectFactory& factory = (*stages[s].getEffect())->getFactory();
fEffectKeys[s] = factory.glEffectKey(stages[s], gpu->glCaps());
// use separate tex coords?
- if (random->nextBool()) {
- int t = random->nextULessThan(GrDrawState::kMaxTexCoords);
- fVertexLayout |= GrDrawState::StageTexCoordVertexLayoutBit(s, t);
+ if (!useOnce && random->nextBool()) {
+ fVertexLayout |= GrDrawState::StageTexCoordVertexLayoutBit(s);
+ useOnce = true;
}
}
}