Add a '-l' flag to testgldispatch, which tells it to test a generated stub
at the very end of the dispatch table.
On PPC, looking up a function past index 4096 requires more than just a simple
register+immediate load, so this makes sure that it's correct.
These use the symbol-check.py script from mesa, and should help to
ensure that glvnd doesn't start exposing/hiding new symbols. It's also
useful to double check that meson and autotools are doing the same
thing.
Many project in the freedesktop graphics space use editorconfig files as
a way to standardize style in an editor agnostic way. This one
configures all of the files current in libglvnd (I looked at the .c and
.h files and they seem to all use 4 spaces for indent). Because it
seemed everything used 4 spaces I just set that to the default and
overrode as necessary.
Fix a bug in gen_egl_dispatch.py which caused libEGL.so to export two extension
functions, eglCreatePlatformWindowSurfaceEXT and
eglCreatePlatformPixmapSurfaceEXT.
Fixes https://gitlab.freedesktop.org/glvnd/libglvnd/issues/196
Change the configure script to define the EGL_NO_X11 macro unconditionally, so
that the EGL headers don't try to include the Xlib headers.
Regardless of whether --disable-x11 is used, libglvnd doesn't need X11-specific
typedefs for EGLNativeDisplayType et. al.
Fixed some missing static libraries for the EGL dummy vendor library.
Added Xlib to the GLX dummy library.
Added the --no-undefined flag for both of the dummy vendor libraries.
Rewrote the generated dispatch stubs for GLX so that they're all defined at
compile time, instead of generating them at runtime.
Insted of patching the address of the vendor-provided functions into the
assembly stubs, it will now keep a separate array of function pointers. The
assembly stubs will look up the approprite entry in that array and jump to it.
As a result, the assembly code is entirely static, so we don't need to deal
with generating or modifying executable code at runtime.
Move the function entry_get_patch_addresses into entry_common.c for all
architectures.
Now that it takes an index instead of a pointer, ther's no longer a difference
between ARMv7 and everything else.
Changed the interface in stub.h to work with function indexes instead of
mapi_stub pointers. The mapi_stub structure is now an internal detail in
stub.c.
The mapi_stub struct now only contains a name and a slot.
Removed the dynamic_stubs array. Instead, it just keeps an array of the
function names for each dynamic stub. It now looks up the function pointers
with entry_get_public, and the slot number is always equal to the index, so the
name is the only thing it needs to keep track of.
Instead of allocating pages of memory for the dynamic dispatch stubs, define
them at build time like the static stubs.
The dynamic stubs are identical to the static ones, so we can use the same code
to define both the static and dynamic stubs at compile time.
Removed entry_generate(). entry_generate_default_code is now only used to
restore entrypoints after patching.
Aside from simplifying things by not having a separate allocation for the
dynamic stubs, this should also allow the dispatch stubs to function properly
in both processes after a call to fork.
Change glMakeCurrentTestResults to a GLX function instead of a GL function, so
that it can be dispatched using a vendor-provided stub instead of having to
generate one.
Remove the testglxmclate test, and the --late option in testglxmakecurrent,
since that only makes sense when MakeCurrentTestResults was a GL function.
Set the environment variable __GLX_FORCE_VENDOR_LIBRARY_0 for all of the GLX
tests instead of __GLX_VENDOR_LIBRARY_NAME.
Individual tests can force libGLX to load a vendor library early by calling
glXGetClientString or similar.
It now calls glXGetClientString up front to load the dummy vendor library. The
GLX entrypoint generation path has its own test now, so this test can now work
on builds without assembly support.
It now uses glXQueryServerString to test calling a core GLX function. That's a
better test because it returns a predictable value, so we can make sure that it
actually gets dispatched to the vendor library, instead of just checking that
it doesn't crash.
For testing looking up an OpenGL function, it'll call glXGetProcAddress and
directly call __glDispatchGetProcAddress, and make sure that it gets the same
pointer from both. It doesn't try to call the function, since OpenGL
dispatching has its own tests.
Added a separate test program testglxgetprocaddress_genentry to test the GLX
entrypoint generation by itself instead of lumping that in with
testglxgetprocaddress.
Define a new USE_DISPATCH_ASM macro in config.h if assembly dispatch stubs are
enabled. Update the GLX entrypoint generation to use that macro instead of
checking all of the USE_*_ASM macros.
This is less likely to break if we add assembly support for another
architecture. In addition, it'll make it easier to skip any unit tests
that depend on being able to generate new dispatch stubs.
The one in Mesa is empty but appears to come from some Khronos
repository, but gl3ext.h has never existed in the OpenGL-Registry
repository on github. Provide it for backwards compatibility.
Closes: https://gitlab.freedesktop.org/glvnd/libglvnd/issues/195
Add a .gitlab-ci.yml file to run libglvnd's unit tests.
The "build-distcheck" target will simply run "make distcheck". That should also
cover running the unit tests for the x86-64 TLS build.
The "build-i386", "build-i386-tsd", and "build-x86-64-tsd" targets will build
and test the x86 TLS and TSD builds and the x86-64 TSD build.
The pure C stubs aren't covered yet, but they'll be easy to add once the unit
tests are fixed for them.
ARM and PPC builds also aren't covered yet.
egl: Sync with Khronos
Update egl.h and egl.xml to upstream commit de3a5e867d906a04a5c37ee0d89e7f01d3598eb9.
Closes#193
See merge request glvnd/libglvnd!192
commit de3a5e867d906a04a5c37ee0d89e7f01d3598eb9
Author: Ken Russell <kbrussel@alum.mit.edu>
Date: Sat Oct 12 05:44:43 2019 -0700
Reserve enums 0x34A0..0x34AF for ANGLE project. (#93)
Closes: https://gitlab.freedesktop.org/glvnd/libglvnd/issues/193