Disallow glBlitFramebuffer for multi-view framebuffers

According to the ANGLE_multiview spec, glBlitFramebuffer must
generate an INVALID_FRAMEBUFFER_OPERATION error if either the active read
framebuffer, or active draw framebuffer has a multi-view layout.

BUG=angleproject:2062
TEST=angle_end2end_tests

Change-Id: I885bdc970c9606cfad882f31759f5780c65d15e5
Reviewed-on: https://chromium-review.googlesource.com/590237
Commit-Queue: Martin Radev <mradev@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index 206762a..7e4fe4e 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -1809,6 +1809,22 @@
         }
     }
 
+    // ANGLE_multiview, Revision 1:
+    // Calling BlitFramebuffer will result in an INVALID_FRAMEBUFFER_OPERATION error if the
+    // multi-view layout of the current draw framebuffer or read framebuffer is not NONE.
+    if (readFramebuffer->getMultiviewLayout() != GL_NONE)
+    {
+        context->handleError(InvalidFramebufferOperation()
+                             << "Attempt to read from a multi-view framebuffer.");
+        return false;
+    }
+    if (drawFramebuffer->getMultiviewLayout() != GL_NONE)
+    {
+        context->handleError(InvalidFramebufferOperation()
+                             << "Attempt to write to a multi-view framebuffer.");
+        return false;
+    }
+
     return true;
 }