Change the cache clear instructions for generated PPC64LE code so that it uses
an input variable instead of an output variable.
With an output variable, it doesn't use the correct address for the dcbst and
icbi instructions, possibly causing it to crash.
Added the files and makefile changes needed for adding support for ppc64le
dispatch stubs.
The actual assembly code still needs to be written, along with any other
arch-specific requirements for self-modifying code.
The new entry_ppc64le_*.c files are mostly based on the x86-64 files.
It still needs:
- Assembly code for OpenGL dispatch stubs in entry_ppc64le_tls.c,
entry_ppc64le_tsd.c, or both.
- Assembly code for GLX dispatch stubs in glvnd_genentry.c.
- Assembly code for the entrypoint patching tests in patchentrypoints.c.
Replaced testpatchentrypoints_gldispatch with three new unit tests.
testgldispatch_static and testgldispatch_generated test dispatching to multiple
vendor libraries through static and generated dispatch stubs, respectively.
testgldispatch_generated tests entrypoint patching and unpatching. This adds
coverage for patching generated stubs in addition to the static ones.
The entrypoint patching functions in tests/dummy/patchentrypoints.c now take
the name of the function to patch, instead of hard-coding it to only patch
glVertex3fv.
Added three new configure options to disable building the EGL, GLX, GLES
libraries.
In the tests makefile, move the list of test scripts to separate unconditional
variables, and add those to EXTRA_DIST. Just conditionally adding variables to
TESTS isn't enough to include the test scripts in the dist package.
Split up the TESTS and check_PROGRAMS variable assignments, so that they're
assigned next to the commands to build each test.
In addition to better readability and making it easier to avoid merge
conflicts, this will allow making some of the tests conditional based on build
options.
Add a test for switching between different contexts across multiple vendors.
The new test also checks libEGL's recovery when a vendor's eglMakeCurrent
fails.
The EGL dummy vendor will now keep track of the current context, so that we
can test whether eglMakeCurrent calls get passed through correctly.
Also added a command to force an eglMakeCurrent call to fail, and to fetch the
the current context from directly from a vendor library.
Added a test for EGL_EXT_device_enumeration and EGL_EXT_platform_device, plus
dispatching to an EGL extesnion function based on an EGLDeviceEXT handle.
Added a test for eglGetProcAddress and dispatching for EGL and GL functions.
Added three EGL extension functions to the EGL dummy vendor, to test
dispatching extensions by display, device, and current context.
Added a simple implementation of eglCreateContext, eglDestroyContext, and
eglMakeCurrent, and glGetString.
Added two dummy libraries for EGL. They both use the same code, but each one
has a name string that can be used to check which vendor something is
dispatched to.
The dummy library is still incomplete, but more functions will be add later
along with more tests.
The test just creates an EGLDisplay using a dummy platform type, and then
checks to make sure that the display dispatches to the correct vendor library.
Also added a script to set up the test environment, and a file for common
functions and variables for EGL tests.
Change the assembly template arrays for ARMv7 to use arrays of 16-bit integers
instead of 8-bit.
This removes the need to byte swap them on little-endian systems.
Add a new unit test, testpatchentrypoints_gldispatch. It calls into
libGLdispatch directly instead of going through GLX or EGL, and it tests
patching and unpatching between multiple vendor libraries.
Rewrote the x86-64 assembly for the entrypoint patching tests. It now uses
absolute memory addresses instead of RIP-relative, so it can work even if the
variable that it's supposed to update isn't within +-2GB of the function.