SkSTArray<8, const GrEffectStage*, true> coverageStages;
GrGLProgramDesc desc;
GrGLProgramDesc::Build(this->getDrawState(),
- kDrawPoints_DrawType == type,
+ type,
blendOpts,
srcCoeff,
dstCoeff,
break;
default:
vbuf = NULL; // suppress warning
- GrCrash("Unknown geometry src type!");
+ SkFAIL("Unknown geometry src type!");
}
SkASSERT(NULL != vbuf);
break;
default:
ibuf = NULL; // suppress warning
- GrCrash("Unknown geometry src type!");
+ SkFAIL("Unknown geometry src type!");
}
SkASSERT(NULL != ibuf);
GrGLAttribArrayState* attribState =
fHWGeometryState.bindArrayAndBuffersToDraw(this, vbuf, ibuf);
- if (!fCurrentProgram->hasVertexShader()) {
- int posIdx = this->getDrawState().positionAttributeIndex();
- const GrVertexAttrib* vertexAttrib = this->getDrawState().getVertexAttribs() + posIdx;
- GrVertexAttribType attribType = vertexAttrib->fType;
- SkASSERT(!GrGLAttribTypeToLayout(attribType).fNormalized);
- SkASSERT(GrGLAttribTypeToLayout(attribType).fCount == 2);
-
- // Attrib at location 0 is defined to be bound to vertex in fixed-function pipe. Asserts
- // above should make sure position attribute goes to location 0 when below code is executed.
-
- attribState->set(this,
- 0,
- vbuf,
- GrGLAttribTypeToLayout(attribType).fCount,
- GrGLAttribTypeToLayout(attribType).fType,
- GrGLAttribTypeToLayout(attribType).fNormalized,
- stride,
- reinterpret_cast<GrGLvoid*>(
- vertexOffsetInBytes + vertexAttrib->fOffset));
- attribState->disableUnusedArrays(this, 1);
- } else {
+ if (fCurrentProgram->hasVertexShader()) {
int vertexAttribCount = this->getDrawState().getVertexAttribCount();
uint32_t usedAttribArraysMask = 0;
const GrVertexAttrib* vertexAttrib = this->getDrawState().getVertexAttribs();