Commit d627d154 by Jamie Madill Committed by Commit Bot

GLES1: Correct 'active' attributes mask.

The active attributes are those consumed by the Program. Previously we were returning those enabled as client arrays. But this excluded default attributes. Uncovered when changing how resource usage was tracked for Vulkan multithreading. Bug: angleproject:2464 Change-Id: I48996be9e4470bb1432e042f98046c95ea8adbfe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1808718 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent a0159c03
...@@ -9055,7 +9055,7 @@ void StateCache::updateActiveAttribsMask(Context *context) ...@@ -9055,7 +9055,7 @@ void StateCache::updateActiveAttribsMask(Context *context)
return; return;
} }
AttributesMask activeAttribs = isGLES1 ? glState.gles1().getVertexArraysAttributeMask() AttributesMask activeAttribs = isGLES1 ? glState.gles1().getActiveAttributesMask()
: glState.getProgram()->getActiveAttribLocationsMask(); : glState.getProgram()->getActiveAttribLocationsMask();
const VertexArray *vao = glState.getVertexArray(); const VertexArray *vao = glState.getVertexArray();
......
...@@ -512,6 +512,12 @@ AttributesMask GLES1State::getVertexArraysAttributeMask() const ...@@ -512,6 +512,12 @@ AttributesMask GLES1State::getVertexArraysAttributeMask() const
return attribsMask; return attribsMask;
} }
AttributesMask GLES1State::getActiveAttributesMask() const
{
// The program always has 8 attributes enabled.
return AttributesMask(0xFF);
}
void GLES1State::setHint(GLenum target, GLenum mode) void GLES1State::setHint(GLenum target, GLenum mode)
{ {
setDirty(DIRTY_GLES1_HINT_SETTING); setDirty(DIRTY_GLES1_HINT_SETTING);
......
...@@ -215,6 +215,7 @@ class GLES1State final : angle::NonCopyable ...@@ -215,6 +215,7 @@ class GLES1State final : angle::NonCopyable
const PointParameters &pointParameters() const; const PointParameters &pointParameters() const;
AttributesMask getVertexArraysAttributeMask() const; AttributesMask getVertexArraysAttributeMask() const;
AttributesMask getActiveAttributesMask() const;
void setHint(GLenum target, GLenum mode); void setHint(GLenum target, GLenum mode);
GLenum getHint(GLenum target); GLenum getHint(GLenum target);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment