Commit 0a17e484 by Jamie Madill Committed by Commit Bot

Vulkan: Fix sync of initially disabled attributes.

If an attribute was never enabled or disabled the default state was not properly synced in our implementation. This wasn't caught by currently enabled tests. Those tests are now enabled in VertexAttributeTest. Bug: angleproject:2800 Change-Id: I97c063651911379e16de4ee557d9840782114c54 Reviewed-on: https://chromium-review.googlesource.com/1199724Reviewed-by: 's avatarFrank Henigman <fjhenigman@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 9808d38c
...@@ -7758,11 +7758,10 @@ void StateCache::updateActiveAttribsMask(Context *context) ...@@ -7758,11 +7758,10 @@ void StateCache::updateActiveAttribsMask(Context *context)
const AttributesMask &clientAttribs = vao->getClientAttribsMask(); const AttributesMask &clientAttribs = vao->getClientAttribsMask();
const AttributesMask &enabledAttribs = vao->getEnabledAttributesMask(); const AttributesMask &enabledAttribs = vao->getEnabledAttributesMask();
const AttributesMask &activeEnabled = activeAttribs & enabledAttribs;
activeAttribs &= enabledAttribs; mCachedActiveClientAttribsMask = activeEnabled & clientAttribs;
mCachedActiveBufferedAttribsMask = activeEnabled & ~clientAttribs;
mCachedActiveClientAttribsMask = activeAttribs & clientAttribs;
mCachedActiveBufferedAttribsMask = activeAttribs & ~clientAttribs;
mCachedActiveDefaultAttribsMask = activeAttribs & ~enabledAttribs; mCachedActiveDefaultAttribsMask = activeAttribs & ~enabledAttribs;
mCachedHasAnyEnabledClientAttrib = (clientAttribs & enabledAttribs).any(); mCachedHasAnyEnabledClientAttrib = (clientAttribs & enabledAttribs).any();
} }
......
...@@ -93,6 +93,9 @@ VertexArrayVk::VertexArrayVk(const gl::VertexArrayState &state, RendererVk *rend ...@@ -93,6 +93,9 @@ VertexArrayVk::VertexArrayVk(const gl::VertexArrayState &state, RendererVk *rend
mDynamicVertexData.init(1, renderer); mDynamicVertexData.init(1, renderer);
mDynamicIndexData.init(1, renderer); mDynamicIndexData.init(1, renderer);
mTranslatedByteIndexData.init(1, renderer); mTranslatedByteIndexData.init(1, renderer);
// Initially consider all inputs dirty.
mDirtyPackedInputs.set();
} }
VertexArrayVk::~VertexArrayVk() VertexArrayVk::~VertexArrayVk()
......
...@@ -961,10 +961,6 @@ TEST_P(VertexAttributeTest, DisabledAttribArrays) ...@@ -961,10 +961,6 @@ TEST_P(VertexAttributeTest, DisabledAttribArrays)
// TODO: Support this test on Vulkan. http://anglebug.com/2797 // TODO: Support this test on Vulkan. http://anglebug.com/2797
ANGLE_SKIP_TEST_IF(IsLinux() && IsVulkan() && IsIntel()); ANGLE_SKIP_TEST_IF(IsLinux() && IsVulkan() && IsIntel());
// TODO: Fix syncing of default attributes when there is no call to enable/disable.
// http://anglebug.com/2800
ANGLE_SKIP_TEST_IF(IsVulkan());
constexpr char vsSource[] = constexpr char vsSource[] =
"attribute vec4 a_position;\n" "attribute vec4 a_position;\n"
"attribute vec4 a_color;\n" "attribute vec4 a_color;\n"
......
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