Move the early-return case of zero mask to Context::blitFramebuffer
When the mask is zero, no buffers are copied in BlitFramebuffer. But we still
need to check all the error situations. So mask of zero should be put in
blitFramebuffer not the validation file.
Meanwhile, we adjust the checking sequence to pass the deqp case.
BUG=angleproject:2375
TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.blit_framebuffer
Change-Id: I73c78ffb8853153f70fc30e8ae0e704e08e454ac
Reviewed-on: https://chromium-review.googlesource.com/938573
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 5aeb75c..b9b2cd9 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -2930,6 +2930,13 @@
GLbitfield mask,
GLenum filter)
{
+ if (mask == 0)
+ {
+ // ES3.0 spec, section 4.3.2 specifies that a mask of zero is valid and no
+ // buffers are copied.
+ return;
+ }
+
Framebuffer *drawFramebuffer = mGLState.getDrawFramebuffer();
ASSERT(drawFramebuffer);