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.
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.
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.