Allow reads from a multiview framebuffer with one view

It's safe to read from a multiview framebuffer if it is layered and
has just one view. The native OVR_multiview spec supports this as
well.

BUG=angleproject:2062
TEST=angle_end2end_tests

Change-Id: I04e1364390574075f7e06e39a64e3bf05a539a05
Reviewed-on: https://chromium-review.googlesource.com/1156509
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Framebuffer.cpp b/src/libANGLE/Framebuffer.cpp
index 67f9121..ec5a9a1 100644
--- a/src/libANGLE/Framebuffer.cpp
+++ b/src/libANGLE/Framebuffer.cpp
@@ -2057,6 +2057,12 @@
     return mState.getMultiviewLayout();
 }
 
+bool Framebuffer::readDisallowedByMultiview() const
+{
+    return (mState.getMultiviewLayout() != GL_NONE && mState.getNumViews() > 1) ||
+           mState.getMultiviewLayout() == GL_FRAMEBUFFER_MULTIVIEW_SIDE_BY_SIDE_ANGLE;
+}
+
 Error Framebuffer::ensureClearAttachmentsInitialized(const Context *context, GLbitfield mask)
 {
     const auto &glState = context->getGLState();