Index: src/gpu/GrDrawState.cpp |
=================================================================== |
--- src/gpu/GrDrawState.cpp (revision 8387) |
+++ src/gpu/GrDrawState.cpp (working copy) |
@@ -59,7 +59,7 @@ |
#if GR_DEBUG |
uint32_t overlapCheck = 0; |
#endif |
- GrAssert(count <= GrDrawState::kAttribIndexCount); |
+ GrAssert(count <= GrDrawState::kVertexAttribCnt); |
size_t size = 0; |
for (int index = 0; index < count; ++index) { |
size_t attribSize = GrDrawState::kVertexAttribSizes[attribs[index].fType]; |
@@ -83,14 +83,13 @@ |
0, // position is not reflected in the bindings |
kColor_AttribBindingsBit, |
kCoverage_AttribBindingsBit, |
- kEdge_AttribBindingsBit, |
kLocalCoords_AttribBindingsBit, |
}; |
//////////////////////////////////////////////////////////////////////////////// |
void GrDrawState::setVertexAttribs(const GrVertexAttrib* attribs, int count) { |
- GrAssert(count <= GrDrawState::kAttribIndexCount); |
+ GrAssert(count <= GrDrawState::kVertexAttribCnt); |
fVertexAttribs.reset(); |
for (int index = 0; index < count; ++index) { |
fVertexAttribs.push_back(attribs[index]); |
@@ -140,18 +139,16 @@ |
attributeTypes[attributeIndex] = kBuiltInAttributeType; |
} |
} |
- for (int j = kEdge_AttribIndex; j < kAttribIndexCount; ++j) { |
- if (fCommon.fAttribBindings & kAttribIndexMasks[j]) { |
- int attributeIndex = fAttribIndices[j]; |
- if (attributeIndex >= kVertexAttribCnt) { |
- return false; |
- } |
- // they should not be shared at all |
- if (attributeTypes[attributeIndex] != -1) { |
- return false; |
- } |
- attributeTypes[attributeIndex] = kBuiltInAttributeType; |
+ if (fCommon.fAttribBindings & kAttribIndexMasks[kLocalCoords_AttribIndex]) { |
+ int attributeIndex = fAttribIndices[kLocalCoords_AttribIndex]; |
+ if (attributeIndex >= kVertexAttribCnt) { |
+ return false; |
} |
+ // they should not be shared at all |
+ if (attributeTypes[attributeIndex] != -1) { |
+ return false; |
+ } |
+ attributeTypes[attributeIndex] = kBuiltInAttributeType; |
} |
// now those set by effects |
@@ -371,12 +368,10 @@ |
} |
} |
- // check for coverage due to constant coverage, per-vertex coverage, |
- // edge aa or coverage stage |
+ // check for coverage due to constant coverage, per-vertex coverage, or coverage stage |
bool hasCoverage = forceCoverage || |
0xffffffff != this->getCoverage() || |
- (bindings & GrDrawState::kCoverage_AttribBindingsBit) || |
- (bindings & GrDrawState::kEdge_AttribBindingsBit); |
+ (bindings & GrDrawState::kCoverage_AttribBindingsBit); |
for (int s = this->getFirstCoverageStage(); |
!hasCoverage && s < GrDrawState::kNumStages; |
++s) { |