Disallow active transform feedback with a multi-view draw framebuffer

According to the ANGLE_multiview spec Draw* commands should generate
an INVALID_OPERATION error if there is an active transform feedback
object and the number of views in the active draw framebuffer is greater
than 1. The patch addresses this by extending the base draw call
validation.

BUG=angleproject:2062
TEST=angle_end2end_tests

Change-Id: I67221cb2cfee6febae8d97697b234aeffff313de
Reviewed-on: https://chromium-review.googlesource.com/589268
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 f4712a8..5e7806b 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -2821,13 +2821,25 @@
 
     if (context->getExtensions().multiview)
     {
-        const int programNumViews = program->getNumViews();
-        if (programNumViews != -1 && framebuffer->getNumViews() != programNumViews)
+        const int programNumViews     = program->getNumViews();
+        const int framebufferNumViews = framebuffer->getNumViews();
+        if (programNumViews != -1 && framebufferNumViews != programNumViews)
         {
             context->handleError(InvalidOperation() << "The number of views in the active program "
                                                        "and draw framebuffer does not match.");
             return false;
         }
+
+        const TransformFeedback *transformFeedbackObject = state.getCurrentTransformFeedback();
+        if (transformFeedbackObject != nullptr && transformFeedbackObject->isActive() &&
+            framebufferNumViews > 1)
+        {
+            context->handleError(InvalidOperation()
+                                 << "There is an active transform feedback object "
+                                    "when the number of views in the active draw "
+                                    "framebuffer is greater than 1.");
+            return false;
+        }
     }
 
     // Uniform buffer validation