| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
| |
The display may be NULL when checking a handle.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
| |
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
| |
progs/egl/demo3.c is also changed since it uses an internal function.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
| |
The hash table was used to map a display to a handle. It is simpler to
cast directly.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
| |
The hash table was used to map a surface to a handle. It is simpler to
cast directly.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
| |
Move drv->API.Terminate call to eglTerminate. Remove
_eglReleaseDisplayResource as drivers are doing it.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
| |
Thread infos and displays are usually not freed by applications. This
commit add atexit calls to free them.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
| |
Add a convenient wrapper to register atexit calls. Add mutex to
_eglGlobal along the way.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
| |
Now that display and surface hash tables are moved out, _eglGlobal can
be initialized statically.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
| |
_eglFiniDisplay is called at exit time to free allocated displays. It
is, however, not used right now.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
| |
Move display and surface hash tables to egldisplay.c, and have them
initialized on demand.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
| |
The implementation uses pthread mutex when available. Otherwise, it is
no-op.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
| |
Signed-off-by: Pauli Nieminen <[email protected]>
|
|
|
|
|
|
|
| |
EGL_TEXTURE_FORMAT and EGL_TEXTURE_TARGET should default to
EGL_NO_TEXTURE.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Now that a current surface points back to its binding context, and a
current context points back to its binding thread, make sure there is no
dangling pointers. This commit reworks eglMakeCurrent, adds more checks
to avoid stealing context or surfaces from another thread, and correctly
destroys unlinked context and surfaces.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
|
|
| |
IsBound tells if a context or surface is current. What it does not tell
is, to which thread a context is current, or to which context a surface
is current. This commit replaces IsBound by a pointer to the binding
thread or context.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
| |
Casting an unsigned int to or from a pointer directly gives warnings on
x86-64. Add wrappers to silence the warnings.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
| |
This silences a compiler warning.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Compiling mesa on a system with no X headers installed in the default
include paths fails due to missing X11 includes. The header includes are
picked up by configure but not applied.
Signed-off-by: Peter Hutterer <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
|
|
|
|
| |
Not sure how these got left out from earlier commit.
|
|
|
|
|
|
|
|
| |
A context or surface that is neither linked to a display nor current to
a thread should be destroyed. Therefore, an unlinked context or surface
implies a pending delete automatically.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
| |
eglTerminate should destroy the contexts and surfaces of the display.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
| |
The latest revision of the spec explicitly requires the same handle to
be returned for the same native display.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
|
| |
This commit uses the newly introduced link functions to manage EGL
contexts and surfaces. As a result of this, the API for drivers are
changed. All drivers are updated for the change.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EGL contexts and surfaces are resources of displays. They should be
managed by displays. This commit adds a bunch of functions to
egldisplay.c to help establish the links between contexts/surfaces and
displays. How links are established is considered opaque outside
display. Functions like _eglGetSurfaceHandle or _eglLookupSurface are
therefore moved to egldisplay.c, with some small modifications.
The idea is also extended to display. That is, displays need to link to
themselves to be looked up.
This commit only adds the functions. A commit to use them should
follow.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
| |
EGL allows multiple current contexts, as long as they are bound to
different client APIs.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
|
|
| |
This commit introduces a "current" system to manage per-thread info. It
uses TLS, if GLX_USE_TLS is defined, or pthread, if PTHREADS is defined.
If none of them are defined, it uses a dummy implementation that is just
like before.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
|
|
| |
Only INLINE (from mesa/main/compiler.h) is defined now. It may be used
to deal with symbol visibility and int/pointer conversion in the future.
Signed-off-by: Chia-I Wu <[email protected]>
Signed-off-by: Brian Paul <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The special feature of bin/minstall to copy symlinks is only ever needed
when installing libraries which may have .so symlinks. All the headers
and directories can use a normal install program.
These two modes are separated as $(INSTALL) and $(MINSTALL) to allow the
user (or autoconf) to override installing normal files as they please.
An autoconf check for the install program has been added and will be
used in preference to minstall when available.
Fixes bug 16053.
|
|
|
|
|
|
|
| |
I don't think anyone besides a developer would ever want to use the demo
egl driver. Furthermore, egl would only ever load demodriver if it was
set via EGL_DRIVER in the environment. In that case, I think you can
point it to your mesa source directory.
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <[email protected]>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
building libEGL
EGL_LIB_DEPS may need fine-tuning for some platforms. It's only defined
in configs/default ATM.
|
|
|
|
| |
Signed-off-by: Benjamin Close <[email protected]>
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Signed-off-by: Johannes Engel <[email protected]>
Acked-by: Jakob Bornecrantz <[email protected]>
|