aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2014-10-21 07:47:10 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-21 07:47:10 -0700
commitc0651c14ed9dc9015d8882885ee42a3c572e8e7e (patch)
treeaf25fe170c79a9ee9bf481b0cc4ef7a438d64e74
parentbf5473b218c88ad8d28d477603739a868917e2e0 (diff)
Add check to see if we need to remove fixed funciton VA in OptDrawState
-rw-r--r--src/gpu/GrOptDrawState.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp
index 40e0c6ce1f..77a9fc8dc4 100644
--- a/src/gpu/GrOptDrawState.cpp
+++ b/src/gpu/GrOptDrawState.cpp
@@ -48,7 +48,9 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState,
this->adjustFromBlendOpts(drawState, &firstColorStageIdx, &firstCoverageStageIdx,
&fixedFunctionVAToRemove);
// Should not be setting any more FFVA to be removed at this point
- this->removeFixedFunctionVertexAttribs(fixedFunctionVAToRemove);
+ if (0 != fixedFunctionVAToRemove) {
+ this->removeFixedFunctionVertexAttribs(fixedFunctionVAToRemove);
+ }
this->getStageStats(drawState, firstColorStageIdx, firstCoverageStageIdx);
this->setOutputStateInfo(drawState, caps, firstCoverageStageIdx, &separateCoverageFromColor);