Age | Commit message (Collapse) | Author |
|
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
This lifts the requirement that a context must be direct.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Separete Drawable and GLXDrawable. Add support for pbuffer and pixmap
surfaces on GLX <= 1.3. Remove surface binding code that will never
work.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Proper detection of GLX extensions. Convert fbconfigs or visuals in a
more unified way and validate the resulting configs.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Signed-off-by: Chia-I Wu <olvaffe@gmail.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>
|
|
This adds error checking to eglSwapInterval and clamps the swap
interval.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Mention that opaque handles are looked up and checked.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
This is just a cosmetic change.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Remove an extraneous semicolon.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
A stupid bug by me made the check void.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Add _eglSetLogger and _eglSetLogLevel to allow drivers to change the
message logger or report level.
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>
|
|
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
eglGetProcAddress may not be used to query core (non-extension)
functions.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
This allows an EGL driver to be compiled together with libEGL.so. It
eliminates the need to specify a driver, or support module loading on
new platforms.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Call _eglConfigFromContextModesRec to convert __GLcontextModes to
_EGLConfig. Single-buffered configs are no longer skipped.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
_eglConfigFromContextModesRec is used to convert a __GLcontextModes to a
_EGLConfig. Note that the config is not validated. An invalid mode
is likely to give an invalid config.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Make it similiar to how contexts and surfaces are looked up. It should
be slightly faster, and work better with multiple displays.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
This mainly implements the algorithms for configuration selection and
sorting, described in the spec. User errors should also be correctly
detected and reported.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Config keys are almost config attributes. A valid config attribute is a
valid config key, but a valid config key may not be a valid config
attribute.
This commit does not distinguish the differences.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
It is not used anymore.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
This is to allow a driver to drive multiple displays. Remove the use of
_EGL_PLATFORM_X and obsolete code along the way.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
egl_xdri does not compile for some time. This commit revives the
driver. It no longer depends on libGL.so for GLX related functions.
Instead, it uses code from src/glx/ directly. Both DRI and DRI2 are
supported.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
The real difference is that the driver suffix is now appended. This
also fixes an annoying bug that EGL_DRIVER could not specify the path to
a driver because a suffix was always appended.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
libX11 is used to determine the screen number, which is in turned used
to determine the DRI driver. However, the sysfs interface for
determining the DRI driver is gone, and no working driver depends on
this mechanism.
Display string parsing is moved to a new function,
_eglSplitDisplayString.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
The display may be NULL when checking a handle.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Handle checking was done using hash tables. Now that they are gone, we
have to loop over the lists.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
progs/egl/demo3.c is also changed since it uses an internal function.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
The hash table was used to map a display to a handle. It is simpler to
cast directly.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
The hash table was used to map a surface to a handle. It is simpler to
cast directly.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Move drv->API.Terminate call to eglTerminate. Remove
_eglReleaseDisplayResource as drivers are doing it.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Move some fields of _EGLDriver to _EGLDisplay. It also becomes
unnecessary to pass _EGLDisplay to drivers when _eglMain is called.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Driver is chosen and preloaded when eglGetDisplay is called. Later when
eglInitialize is called, the same driver is matched to initialize the
display. Also, add new, but unused, hooks to EGLDriver to allow a
driver to probe a display or unload itself.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
The motivation is so that drivers do not need to look up and check for
bad display, context, and etc. It also becomes unnecessary for drivers
to call the link functions.
This commit makes eglapi.[ch] do the lookup and check. As a result, the
driver API is overhauled, and almost all sources and drivers need
update. The updates are mainly find and replace with human brains.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Thread infos and displays are usually not freed by applications. This
commit add atexit calls to free them.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Add a convenient wrapper to register atexit calls. Add mutex to
_eglGlobal along the way.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Now that display and surface hash tables are moved out, _eglGlobal can
be initialized statically.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
_eglFiniDisplay is called at exit time to free allocated displays. It
is, however, not used right now.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Move display and surface hash tables to egldisplay.c, and have them
initialized on demand.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Current thread management was initialized in _eglInitGlobals, which is
called only in eglGetDisplay. Since EGL does not require eglGetDisplay
to be called first, the initialization is better to be done on demand.
_eglFiniCurrent is removed, as it is not called at all.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
This is done through pthread TSD destructor. It destroys all thread
infos except for main thread's. The thread info of the main thread is
destroyed by _eglFiniCurrent.
TLS case is not supported yet.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
The implementation uses pthread mutex when available. Otherwise, it is
no-op.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
|
|
EGL_TEXTURE_FORMAT and EGL_TEXTURE_TARGET should default to
EGL_NO_TEXTURE.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|