aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GLProgramsTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/GLProgramsTest.cpp')
-rw-r--r--tests/GLProgramsTest.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index 45c5f2d162..b56c788513 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -121,6 +121,8 @@ bool GrGpuGL::programUnitTest(int maxStages) {
GrGLProgram::Desc pdesc;
GrEffectStage stages[GrDrawState::kNumStages];
+ int currAttribIndex = GrDrawState::kAttribIndexCount;
+ int attribIndices[2];
for (int s = 0; s < maxStages; ++s) {
// enable the stage?
if (random.nextBool()) {
@@ -129,7 +131,10 @@ bool GrGpuGL::programUnitTest(int maxStages) {
&random,
this->getContext(),
dummyTextures));
- stages[s].setEffect(effect.get());
+ for (int i = 0; i < effect.get()->get()->numVertexAttribs(); ++i) {
+ attribIndices[i] = currAttribIndex++;
+ }
+ stages[s].setEffect(effect.get(), attribIndices);
}
}
pdesc.setRandom(&random, this, stages);