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/gl_tests/FramebufferMultiviewTest.cpp b/src/tests/gl_tests/FramebufferMultiviewTest.cpp
index 6108ad1..420b8ae 100644
--- a/src/tests/gl_tests/FramebufferMultiviewTest.cpp
+++ b/src/tests/gl_tests/FramebufferMultiviewTest.cpp
@@ -73,7 +73,9 @@
void initializeFBOs(size_t numColorBuffers, bool stencil, bool depth)
{
- ASSERT(mColorTex.empty() && mDepthStencilTex == 0u && mDepthTex == 0u);
+ ASSERT_TRUE(mColorTex.empty());
+ ASSERT_EQ(0u, mDepthStencilTex);
+ ASSERT_EQ(0u, mDepthTex);
const std::vector<GLenum> &drawBuffers = GetDrawBufferRange(numColorBuffers);
// Generate textures.
@@ -215,8 +217,10 @@
bool stencil,
bool depth)
{
- ASSERT(mColorTex.empty() && mDepthStencilTex == 0u && mDepthTex == 0u);
- ASSERT(baseViewIndex + numViews <= numLayers);
+ ASSERT_TRUE(mColorTex.empty());
+ ASSERT_EQ(0u, mDepthStencilTex);
+ ASSERT_EQ(0u, mDepthTex);
+ ASSERT_LE(baseViewIndex + numViews, numLayers);
// Generate textures.
mColorTex.resize(numColorAttachments);
@@ -274,7 +278,7 @@
GLColor getLayerColor(size_t layer, GLenum attachment, GLint x, GLint y)
{
- ASSERT(layer < mNonMultiviewFBO.size());
+ EXPECT_LT(layer, mNonMultiviewFBO.size());
glBindFramebuffer(GL_FRAMEBUFFER, mNonMultiviewFBO[layer]);
glReadBuffer(attachment);
return angle::ReadColor(x, y);