Vulkan: Edge case test and fix for alpha channel masks
The contextVk color mask needed to be updated when we
were syncing the state of the framebufferVk to make sure
the right mask gets applied in the test described in
ClearTest.cpp
Bug: angleproject:2685
Bug: angleproject:2597
Change-Id: I575028aad4cd495bf4ec1484cc870940dcde92d5
Reviewed-on: https://chromium-review.googlesource.com/1112038
Commit-Queue: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
index e5f2873..33ea773 100644
--- a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
+++ b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
@@ -390,13 +390,12 @@
colorIndex, emulatedFormat.redBits > 0, emulatedFormat.greenBits > 0,
emulatedFormat.blueBits > 0, emulatedFormat.alphaBits > 0);
- // TODO(lucferron): Add a test to trigger edge case where the framebuffer
- // attachment would change but not the binding.
- // http://anglebug.com/2597
const angle::Format &sourceFormat =
renderTarget->getImageFormat().angleFormat();
mEmulatedAlphaAttachmentMask.set(
colorIndex, sourceFormat.alphaBits == 0 && emulatedFormat.alphaBits > 0);
+
+ contextVk->updateColorMask(context->getGLState().getBlendState());
}
else
{