Commit 963759a3 by Jamie Madill Committed by Commit Bot

Vulkan: Mask out implementation dirty bit in sync.

This would needlessly create many redundant sampler objects. Bug: angleproject:4517 Change-Id: Ib8ef28b9bcbbeec804c493fbe677cbee7d9a750d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2159296 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCharlie Lao <cclao@google.com> Reviewed-by: 's avatarTim Van Patten <timvp@google.com>
parent 492ec932
...@@ -1461,7 +1461,11 @@ angle::Result TextureVk::syncState(const gl::Context *context, ...@@ -1461,7 +1461,11 @@ angle::Result TextureVk::syncState(const gl::Context *context,
// Initialize the image storage and flush the pixel buffer. // Initialize the image storage and flush the pixel buffer.
ANGLE_TRY(ensureImageInitialized(contextVk, ImageMipLevels::EnabledLevels)); ANGLE_TRY(ensureImageInitialized(contextVk, ImageMipLevels::EnabledLevels));
if (dirtyBits.none() && mSampler.valid()) // Mask out the IMPLEMENTATION dirty bit to avoid unnecessary syncs.
gl::Texture::DirtyBits localBits = dirtyBits;
localBits.reset(gl::Texture::DIRTY_BIT_IMPLEMENTATION);
if (localBits.none() && mSampler.valid())
{ {
return angle::Result::Continue; return angle::Result::Continue;
} }
...@@ -1472,10 +1476,10 @@ angle::Result TextureVk::syncState(const gl::Context *context, ...@@ -1472,10 +1476,10 @@ angle::Result TextureVk::syncState(const gl::Context *context,
mSampler.reset(); mSampler.reset();
} }
if (dirtyBits.test(gl::Texture::DIRTY_BIT_SWIZZLE_RED) || if (localBits.test(gl::Texture::DIRTY_BIT_SWIZZLE_RED) ||
dirtyBits.test(gl::Texture::DIRTY_BIT_SWIZZLE_GREEN) || localBits.test(gl::Texture::DIRTY_BIT_SWIZZLE_GREEN) ||
dirtyBits.test(gl::Texture::DIRTY_BIT_SWIZZLE_BLUE) || localBits.test(gl::Texture::DIRTY_BIT_SWIZZLE_BLUE) ||
dirtyBits.test(gl::Texture::DIRTY_BIT_SWIZZLE_ALPHA)) localBits.test(gl::Texture::DIRTY_BIT_SWIZZLE_ALPHA))
{ {
if (mImage && mImage->valid()) if (mImage && mImage->valid())
{ {
......
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