eglplatform.h pulls in Xlib.h on X11 platforms. Likewise, the egl glx
driver and egl programs needs to link to libX11. Make sure we use the
locations the user told us about.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
There is no effective changes given how the function is called. It is
still not trivial, but it should be more readable and resemble
_eglBindContextToThread a lot.
When a newly bound context is the same as the previously bound one,
_eglBindContextToThread should still return the context instead of NULL.
This gives the driver a chance to flush the context.
It was added to skip checking EGLDisplay, EGLSurface, and etc. It is
never defined and the spec does not allow the checks to be skipped.
Remove it for good.
The macros give warnings when compiled with -pedantic. This commit is
based on a patch by Brian Paul, with minor changes to add do {} while(0)
and rename the check macros.
This gives a simple access control to the display. It is potentially
slow, but a finer grained mutex can always be used in the future. The
benefit of this simple approach is that drivers need not to worry about
thread-safety.
Use macros to record the status of the function call before returning.
This is the only way that eglGetError can return the status of the most
recent function call.
Add _EGL_CHECK_* which will replace _EGL_DECLARE_* for error checking.
Move _eglCheck* earlier in the file so that the macros and the functions
are grouped together.
Both a link and a binding creates a reference to the resource. Drivers
should not destroy the resource when there is a reference. The
difference is better described in doc/egl.html.
There are standard typecast functions that are common to most drivers.
They are used to typecast, for example, an _EGLSurface to a
driver-defined type.
This commits define _EGL_DRIVER_STANDARD_TYPECASTS and
_EGL_DRIVER_TYPECAST that should hopefully save some typings for driver
writers.
Rename _eglPreloadFile to _eglLoaderFile, and _eglPreloadFile to
_eglLoaderFile. There are several _eglPreload* functions. The
callbacks do not belong to them and it should be better to give them a
different prefix.
EGL_DRIVERS_PATH gives a list of colon-separated directories. The given
directories will be searched when preloading drivers.
This is based on Mike Stroyan's patch, which honors the variable in
_eglPreloadDisplayDrivers. It is extended to honor the variable also in
_eglPreloadUserDriver and _eglPreloadDefaultDriver in this version.
Add missing attributes and use correct types in _EGLSurface. Remove
ifdef tests that serve no purpose. Update _eglQuerySurface and
_eglSurfaceAttrib for missing queries and checks.
Add support EGL_KHR_vg_parent_image and EGL_KHR_gl_*. This is as simple
as adding some flags that can be enabled. Individual drivers need to
implement the extensions before enbaling the flags.
Change _eglInitSurface, _eglInitContext, and _eglInitImage to take an
_EGLDisplay instead of an _EGLDriver. This is a more natural form, and
plus, the display encodes information such as the extensions supported
that might be required for attribute list parsing.
They are either unit tests or to demonstrate how functions are supposed
to be used. The unit test is outdated and it should be better to take a
look at any of the working drivers to see how a function is used.
When no context or surface are given, the display is allowed to be
uninitialized. Most drivers cannot handle an uninitialized display.
But they are updated to at least throw a fatal message.
It works similar to _eglMakeCurrent, except that the old context and
surfaces are returned instead of destroyed. _eglMakeCurrent is now
calling the new _eglBindContext.
The driver pointer of the display was used to decide whether a display
is initialized. Use a boolean for that purpose allows accessing the
driver of an uninitialized display.
An unlinked resource may still be a current resource such as current
surfaces. There might still be a need to know which display the
unlinked resource belongs to.
Add a platform specific function to turn a library name to a library
path. It is used to convert EGL_DRIVER or the default driver to a
library path that can be loaded.
With the addition egl_x11_swrast, egl_softpipe is sort of deprecated.
The new driver serves the same purpose as egl_softpipe does. It is
based on egl_g3d and provides more features.
In current design, multiple drivers will probe the same display and the
best driver is determined. The cache can be used by the drivers to
store and share the probed data.
It can be used to load the user driver specified by EGL_DRIVER, or a set
of drivers specified by EGL_DISPLAY, or the default driver, and in that
order.
Sun cc 5.9 and later (__SUNPRO_C >= 0x590) support __attribute__ calls
for aligned, always_inline, noinline, pure, const, and malloc.
This commit includes updates to files that were regenerated by gl_XML.py
after adding the __SUNPRO_C checks to it
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
This adds error checking to the synchronization primitives. And
eglWaitGL is now implemented by eglWaitClient.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
As a result, EGL_NONE is no longer a valid client API. And it is
possible that no config supports the current bound API.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>