Commit graph

7 commits

Author SHA1 Message Date
Kyle Brenneman ae89ac2619 EGL: Change the vendor config search paths.
Changed the default vendor config paths to be based on the directory options
for configure. libEGL will now look under the sysconfigdir and datadir paths,
in a "glvnd/egl_vendor.d" subdirectory.

Added the "datadir" variable to the pkg-config file, so that other packages can
find the expected location of the JSON files.
2016-08-31 12:01:00 -06:00
Kyle Brenneman 3053b22f3e EGL: Change __EGLapiImports to use (void *) for function pointers.
Trying to cast between __eglMustCastToProperFunctionPointerType and other
function pointer types causes strict aliasing warnings on some compilers.

Instead, just use a simple (void *) type for retrieving function pointers from
a vendor library, like libGLX does.
2016-08-30 13:22:59 -06:00
Kyle Brenneman 67dcf4a14f EGL: Check the version number in the JSON files.
libEGL will now parse the file_format_version value in each vendor's JSON file.
2016-08-01 13:06:17 -06:00
Kyle Brenneman 4f7138cc31 EGL: Check for some client extensions when loading the vendors.
libEGL will now check the client extension strings of each vendor when the
vendor is loaded, and record whether a vendor supports
EGL_EXT_device_base/EGL_EXT_device_enumeration, and the device, Wayland, and
X11 platform extensions.

eglGetDisplay will now check for whether any vendor supports Wayland before it
tries to guess whether the native display pointer is a Wayland display.

When enumerating the device handles for each vendor, libEGL will check for
either EGL_EXT_device_base or EGL_EXT_device_enumeration, instead of just
EGL_EXT_device_base.
2016-08-01 13:06:15 -06:00
Kyle Brenneman f42d89dd99 EGL: Rework the current rendering API.
libEGL will now forward calls to eglBindAPI to the vendor libraries.

Defined as part of the interface that libEGL only supports OpenGL and GLES.

This should simplify the task of porting a driver to EGL, since the eglBindAPI
behavior is closer to a non-glvnd driver.
2016-08-01 13:06:10 -06:00
Kyle Brenneman 31c5e7f602 EGL: Implement EGL_KHR_debug.
Implemented the EGL_KHR_debug extension in libEGL.

Updated the error reporting throughout libEGL to call the debug callback.

This requires that all vendor libraries also support EGL_KHR_debug. The reason
is that the debug callback has to be called every time an EGL error is
generated, and vendor libraries are still responsible for keeping track of EGL
errors on their own.

libEGL should be able to cope with a vendor library that doens't support
EGL_KHR_debug, but if that vendor library is used, then the extension won't
work correctly.
2016-06-22 16:15:32 -06:00
Kyle Brenneman b72018f59a EGL: Initial implementation of libEGL.
The implementation is mostly based off of libGLX.

Unlike GLX, libEGL will load all vendor libraries up front. This is necessary
for dealing with eglGetPlatformDisplay, as well as many client extensions.

Dispatching EGL functions is generally simpler than GLX. All display extension
functions by definition can be dispatched based on an EGLDisplay handle, so
it doesn't need to provide lookup functions for contexts or surfaces, and
vendor libraries don't have to add any EGL objects to tracking.

Only OpenGL and OpenGL ES and a handful of client extensions are supported so
far.
2016-06-22 16:14:16 -06:00