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>
This commit is contained in:
Jamie Madill
2018-12-29 10:29:33 -05:00
committed by Commit Bot
parent c3dc5d4857
commit ba319ba31c
184 changed files with 8238 additions and 1905 deletions

View File

@@ -6,9 +6,10 @@
#include "SampleApplication.h"
#include "angle_gl.h"
#include "util/EGLWindow.h"
#include "util/gles_loader_autogen.h"
#include "util/random_utils.h"
#include "util/system_utils.h"
#include <string.h>
#include <iostream>
@@ -57,6 +58,9 @@ SampleApplication::SampleApplication(std::string name,
requestedRenderer = GetDisplayTypeFromArg(argv[1] + strlen(kUseAngleArg));
}
// Load EGL library so we can initialize the display.
mEntryPointsLib.reset(angle::OpenSharedLibrary(ANGLE_EGL_LIBRARY_NAME));
mEGLWindow.reset(new EGLWindow(glesMajorVersion, glesMinorVersion,
EGLPlatformParameters(requestedRenderer)));
mTimer.reset(CreateTimer());
@@ -125,11 +129,13 @@ int SampleApplication::run()
mOSWindow->setVisible(true);
if (!mEGLWindow->initializeGL(mOSWindow.get()))
if (!mEGLWindow->initializeGL(mOSWindow.get(), mEntryPointsLib.get()))
{
return -1;
}
angle::LoadGLES(eglGetProcAddress);
mRunning = true;
int result = 0;