Re-land "Load entry points dynamically in tests and samples."

Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL
headers.

This CL adds a dynamic loader generator based on XML files. It also
refactors the entry point generation script to move the XML parsing
into a helper class.

Additionally this includes a new GLES 1.0 base header. The new
header allows for function pointer types and hiding prototypes.

All tests and samples now load ANGLE dynamically. In the future this
will be extended to load entry points from the driver directly when
possible. This will allow us to perform more accurate A/B testing.

The new build configuration leads to some tests having more warnings
applied. The CL includes fixes for the new warnings.

Bug: angleproject:2995
Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57
Reviewed-on: https://chromium-review.googlesource.com/c/1392382
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/tests/test_utils/MultiviewTest.cpp b/src/tests/test_utils/MultiviewTest.cpp
index 6d29e74..81d477d 100644
--- a/src/tests/test_utils/MultiviewTest.cpp
+++ b/src/tests/test_utils/MultiviewTest.cpp
@@ -55,7 +55,7 @@
     textureData.resize(viewWidth * height * numLayers * 4, 0u);
 
     // Multisampling is only supported for layered framebuffers.
-    ASSERT((samples == 0) || multiviewLayout == GL_FRAMEBUFFER_MULTIVIEW_LAYERED_ANGLE);
+    ASSERT_TRUE((samples == 0) || multiviewLayout == GL_FRAMEBUFFER_MULTIVIEW_LAYERED_ANGLE);
 
     // We can't upload data to multisample textures, so we clear them using a temporary framebuffer
     // instead. The current framebuffer binding is stored so we can restore it once we're done with
@@ -177,7 +177,7 @@
             break;
         }
         default:
-            UNREACHABLE();
+            ASSERT_TRUE(false);
     }
     ASSERT_GL_NO_ERROR();
 
@@ -193,7 +193,7 @@
                                     GLuint depthTexture,
                                     GLuint depthStencilTexture)
 {
-    ASSERT(colorTexture != 0u);
+    ASSERT_TRUE(colorTexture != 0u);
     std::vector<GLuint> colorTextures(1, colorTexture);
     CreateMultiviewBackingTextures(multiviewLayout, samples, viewWidth, height, numLayers,
                                    colorTextures, depthTexture, depthStencilTexture);
@@ -208,8 +208,8 @@
                              GLuint depthTexture,
                              GLuint depthStencilTexture)
 {
-    ASSERT(multiviewLayout == GL_FRAMEBUFFER_MULTIVIEW_LAYERED_ANGLE || (baseViewIndex == 0));
-    ASSERT(depthTexture == 0u || depthStencilTexture == 0u);
+    ASSERT_TRUE(multiviewLayout == GL_FRAMEBUFFER_MULTIVIEW_LAYERED_ANGLE || (baseViewIndex == 0));
+    ASSERT_TRUE(depthTexture == 0u || depthStencilTexture == 0u);
     switch (multiviewLayout)
     {
         case GL_FRAMEBUFFER_MULTIVIEW_SIDE_BY_SIDE_ANGLE:
@@ -259,7 +259,7 @@
             }
             break;
         default:
-            UNREACHABLE();
+            ASSERT_TRUE(false);
     }
 }
 
@@ -272,7 +272,7 @@
                              GLuint depthTexture,
                              GLuint depthStencilTexture)
 {
-    ASSERT(colorTexture != 0u);
+    ASSERT_TRUE(colorTexture != 0u);
     std::vector<GLuint> colorTextures(1, colorTexture);
     AttachMultiviewTextures(target, multiviewLayout, viewWidth, numViews, baseViewIndex,
                             colorTextures, depthTexture, depthStencilTexture);