diff --git a/third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp b/third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp index 0deef0df8a..1a3a422799 100644 --- a/third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp +++ b/third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp @@ -2237,6 +2237,19 @@ gl::FramebufferStatus FramebufferVk::checkStatus(const gl::Context *context) con gl::err::kFramebufferIncompleteUnsupportedSeparateDepthStencilBuffers); } + // Vulkan requires VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT when multiple + // attachments alias the same memory, and forbids two written aliases in one + // subpass. ANGLE never sets MAY_ALIAS_BIT, so reject duplicate colour + // attachments here (mirrors FramebufferD3D::checkStatus). The frontend only + // checks this when WebGL compatibility is enabled. + ASSERT(!context->isWebGL() || mState.colorAttachmentsAreUniqueImages()); + if (!context->isWebGL() && !mState.colorAttachmentsAreUniqueImages()) + { + return gl::FramebufferStatus::Incomplete( + GL_FRAMEBUFFER_UNSUPPORTED, + gl::err::kFramebufferIncompleteUnsupportedNonUniqueAttachments); + } + return gl::FramebufferStatus::Complete(); }