Expose ViewID_OVR impostor in the fragment shader

The OVR_multiview specification states that gl_ViewID_OVR is visible
at each pipeline stage. Previously to this patch the ViewID_OVR
impostor was declared only in the vertex shader and occurrences of
gl_ViewID_OVR in the fragment shader were not being handled. The
patch addresses the issue by declaring the ViewID_OVR variable as
a vertex output in the vertex shader and as a fragment input
in the fragment shader.

BUG=angleproject:2062
TEST=angle_unittests

Change-Id: I895953e81d3632d9bb873e8ac081fdf36f63f6b7
Reviewed-on: https://chromium-review.googlesource.com/559337
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/compiler/translator/Compiler.cpp b/src/compiler/translator/Compiler.cpp
index 90bb7f7..6e76fe1 100644
--- a/src/compiler/translator/Compiler.cpp
+++ b/src/compiler/translator/Compiler.cpp
@@ -429,9 +429,9 @@
             arrayBoundsClamper.MarkIndirectArrayBoundsForClamping(root);
 
         if (success && (compileOptions & SH_INITIALIZE_BUILTINS_FOR_INSTANCED_MULTIVIEW) &&
-            parseContext.isMultiviewExtensionEnabled() && getShaderType() == GL_VERTEX_SHADER)
+            parseContext.isMultiviewExtensionEnabled() && getShaderType() != GL_COMPUTE_SHADER)
         {
-            DeclareAndInitBuiltinsForInstancedMultiview(root, getNumViews());
+            DeclareAndInitBuiltinsForInstancedMultiview(root, getNumViews(), getShaderType());
         }
 
         // This pass might emit short circuits so keep it before the short circuit unfolding