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/libANGLE/Compiler.cpp b/src/libANGLE/Compiler.cpp
index 32267d1..87c58fa 100644
--- a/src/libANGLE/Compiler.cpp
+++ b/src/libANGLE/Compiler.cpp
@@ -76,6 +76,10 @@
mResources.FragmentPrecisionHigh = 1;
mResources.EXT_frag_depth = extensions.fragDepth;
+ // OVR_multiview state
+ mResources.OVR_multiview = extensions.multiview;
+ mResources.MaxViewsOVR = extensions.maxViews;
+
// GLSL ES 3.0 constants
mResources.MaxVertexOutputVectors = caps.maxVertexOutputComponents / 4;
mResources.MaxFragmentInputVectors = caps.maxFragmentInputComponents / 4;