diff options
author | jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-13 21:05:14 +0000 |
---|---|---|
committer | jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-13 21:05:14 +0000 |
commit | c3413d6f41b07caeed9ff496a1eee56b5a15d8ee (patch) | |
tree | 0eb7473c77f57092a0911bcd9e2bf790ffae969f /src/gpu/gl/GrGLEffect.cpp | |
parent | 1ab0aac67247bf3ec1f23b220456d316d9a80b45 (diff) |
Increase bits for effect attribute key.
We can have an attribute index value up to 7, but only allow 2 bits for each
index in GrGLEffect::GenAttribKey. This change gives them 3 bits (and fixes an
assert when running tests in debug).
Review URL: https://codereview.chromium.org/12431018/
git-svn-id: http://skia.googlecode.com/svn/trunk@8140 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl/GrGLEffect.cpp')
-rw-r--r-- | src/gpu/gl/GrGLEffect.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLEffect.cpp b/src/gpu/gl/GrGLEffect.cpp index f2cd37c93e..478d03dee1 100644 --- a/src/gpu/gl/GrGLEffect.cpp +++ b/src/gpu/gl/GrGLEffect.cpp @@ -39,7 +39,7 @@ GrGLEffect::EffectKey GrGLEffect::GenAttribKey(const GrEffectStage& stage) { GrAssert(numAttributes <= 2); const int* attributeIndices = stage.getVertexAttribIndices(); for (int index = 0; index < numAttributes; ++index) { - EffectKey value = attributeIndices[index] << 2*index; + EffectKey value = attributeIndices[index] << 3*index; GrAssert(0 == (value & key)); // keys for each attribute ought not to overlap key |= value; } |