Fix BlitFramebuffer validation for BGRA sources and targets.
It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and
destinations when resolving multisampled renderbuffers. Expand
BlitFramebuffer's validation to handle this case.
Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work
around an error generated on macOS when querying
GL_MAX_VARYING_COMPONENTS.
Expand the BlitFramebuffer tests to cover these cases and start
running them on the OpenGL backend.
Fix detectition of multisampled D3D11 rendertargets when the sample count
is 1.
BUG=angleproject:891
Change-Id: Ief5531756651caa66f612e647d3d5c05c8c51ff5
Reviewed-on: https://chromium-review.googlesource.com/587459
Reviewed-by: Kenneth Russell <kbr@chromium.org>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index 6598c58..c98e52a 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -2350,8 +2350,8 @@
}
// Return an error if the destination formats do not match
- if (!Format::SameSized(attachment->getFormat(),
- readColorAttachment->getFormat()))
+ if (!Format::EquivalentForBlit(attachment->getFormat(),
+ readColorAttachment->getFormat()))
{
context->handleError(InvalidOperation());
return false;