Initialize ANGLE_multiview caps and workaround state

The patch checks whether ANGLE_multiview can be supported in the OpenGL
renderer, updates the caps and adds a workaround field to enable
multiview support through the NV_viewport_array2 extension.

BUG=angleproject:2062
TEST=angle_end2end_tests

Change-Id: I99dae10564db7bcca41d7624f8de272c1d996e09
Reviewed-on: https://chromium-review.googlesource.com/567934
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/Compiler.cpp b/src/compiler/translator/Compiler.cpp
index a194071..92c850a 100644
--- a/src/compiler/translator/Compiler.cpp
+++ b/src/compiler/translator/Compiler.cpp
@@ -685,12 +685,14 @@
         << ":EXT_shader_framebuffer_fetch:" << compileResources.EXT_shader_framebuffer_fetch
         << ":NV_shader_framebuffer_fetch:" << compileResources.NV_shader_framebuffer_fetch
         << ":ARM_shader_framebuffer_fetch:" << compileResources.ARM_shader_framebuffer_fetch
+        << ":OVR_multiview:" << compileResources.OVR_multiview
         << ":EXT_YUV_target:" << compileResources.EXT_YUV_target
         << ":MaxVertexOutputVectors:" << compileResources.MaxVertexOutputVectors
         << ":MaxFragmentInputVectors:" << compileResources.MaxFragmentInputVectors
         << ":MinProgramTexelOffset:" << compileResources.MinProgramTexelOffset
         << ":MaxProgramTexelOffset:" << compileResources.MaxProgramTexelOffset
         << ":MaxDualSourceDrawBuffers:" << compileResources.MaxDualSourceDrawBuffers
+        << ":MaxViewsOVR:" << compileResources.MaxViewsOVR
         << ":NV_draw_buffers:" << compileResources.NV_draw_buffers
         << ":WEBGL_debug_shader_precision:" << compileResources.WEBGL_debug_shader_precision
         << ":MaxImageUnits:" << compileResources.MaxImageUnits
diff --git a/src/compiler/translator/ShaderLang.cpp b/src/compiler/translator/ShaderLang.cpp
index adeebf3..08c4bbf 100644
--- a/src/compiler/translator/ShaderLang.cpp
+++ b/src/compiler/translator/ShaderLang.cpp
@@ -179,7 +179,7 @@
     // Extensions constants.
     resources->MaxDualSourceDrawBuffers = 0;
 
-    resources->MaxViewsOVR = 2;
+    resources->MaxViewsOVR = 4;
 
     // Disable name hashing by default.
     resources->HashFunction = nullptr;