diff options
Diffstat (limited to 'tests/GLProgramsTest.cpp')
| -rw-r--r-- | tests/GLProgramsTest.cpp | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index 45c5f2d162..bc148f1754 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -23,7 +23,7 @@ void GrGLProgram::Desc::setRandom(SkMWCRandom* random, const GrGpuGL* gpu, const GrEffectStage stages[GrDrawState::kNumStages]) { - fAttribBindings = 0; + fVertexLayout = 0; fEmitsPointSize = random->nextBool(); fColorInput = random->nextULessThan(kColorInputCnt); fCoverageInput = random->nextULessThan(kColorInputCnt); @@ -32,7 +32,7 @@ void GrGLProgram::Desc::setRandom(SkMWCRandom* random, fFirstCoverageStage = random->nextULessThan(GrDrawState::kNumStages); - fAttribBindings |= random->nextBool() ? GrDrawState::kCoverage_AttribBindingsBit : 0; + fVertexLayout |= random->nextBool() ? GrDrawState::kCoverage_VertexLayoutBit : 0; #if GR_GL_EXPERIMENTAL_GS fExperimentalGS = gpu->getCaps().geometryShaderSupport() && random->nextBool(); @@ -40,7 +40,7 @@ void GrGLProgram::Desc::setRandom(SkMWCRandom* random, bool edgeAA = random->nextBool(); if (edgeAA) { - fAttribBindings |= GrDrawState::kEdge_AttribBindingsBit; + fVertexLayout |= GrDrawState::kEdge_VertexLayoutBit; if (gpu->getCaps().shaderDerivativeSupport()) { fVertexEdgeType = (GrDrawState::VertexEdgeType) random->nextULessThan(GrDrawState::kVertexEdgeTypeCnt); @@ -64,31 +64,11 @@ void GrGLProgram::Desc::setRandom(SkMWCRandom* random, fEffectKeys[s] = factory.glEffectKey(stages[s], gpu->glCaps()); // use separate tex coords? if (!useOnce && random->nextBool()) { - fAttribBindings |= GrDrawState::ExplicitTexCoordAttribBindingsBit(s); + fVertexLayout |= GrDrawState::StageTexCoordVertexLayoutBit(s); useOnce = true; } } } - - int attributeIndex = 0; - fPositionAttributeIndex = attributeIndex; - ++attributeIndex; - if (fColorInput || (fAttribBindings & GrDrawState::kColor_AttribBindingsBit)) { - fColorAttributeIndex = attributeIndex; - ++attributeIndex; - } - if (fCoverageInput || (fAttribBindings & GrDrawState::kCoverage_AttribBindingsBit)) { - fCoverageAttributeIndex = attributeIndex; - ++attributeIndex; - } - if (fAttribBindings & GrDrawState::kEdge_AttribBindingsBit) { - fEdgeAttributeIndex = attributeIndex; - ++attributeIndex; - } - if (GrDrawState::AttributesBindExplicitTexCoords(fAttribBindings)) { - fTexCoordAttributeIndex = attributeIndex; - ++attributeIndex; - } } bool GrGpuGL::programUnitTest(int maxStages) { |
