diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-16 14:43:12 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-16 14:43:12 +0000 |
commit | fe070ba6d82a4c77b02d33a46db21acf01050383 (patch) | |
tree | 9840807c3d36119177a26e65800903c24a90dd31 /src | |
parent | e4d3d7ca706dac594e0e6ca13cc4e58d61dd2453 (diff) |
Make sure attribute indexes are correct after restoring vertex attributes
Fix an assert due to
GrDrawState::CommonState::fFixedFunctionVertexAttribIndices getting
out of sync. The assertion in GrDrawState::CommonState::operator==
would fire after using AutoVertexAttribRestore.
AutoVertexAttribRestore would change GrDrawState::fCommon.fVAPtr and
fVACount without updating
GrDrawState::fCommon.fFixedFunctionVertexAttribIndices.
R=jvanverth@google.com, bsalomon@google.com, robertphillips@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/26922004
git-svn-id: http://skia.googlecode.com/svn/trunk@11807 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrDrawState.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h index 6440790c10..889dec9686 100644 --- a/src/gpu/GrDrawState.h +++ b/src/gpu/GrDrawState.h @@ -160,8 +160,7 @@ public: } ~AutoVertexAttribRestore(){ - fDrawState->fCommon.fVAPtr = fVAPtr; - fDrawState->fCommon.fVACount = fVACount; + fDrawState->setVertexAttribs(fVAPtr, fVACount); } private: |