Age | Commit message (Collapse) | Author |
|
Remove all _egl<Res>IsLinked and _egl<Res>IsBound. Update
_eglBindContext and drivers to do reference counting.
|
|
All display resources are already initialized with a display. Linking
simply links a resource to its display.
|
|
Do not call into the driver if the extension for the called function is
not enabled.
|
|
_EGL_CHECK_DISPLAY checks the display and returns from eglCreateContext
on error.
|
|
Create EGLImages from DRM buffer handles.
|
|
When _EGL_GET_CORE_ADDRESSES is defined, eglGetProcAddress can be used to query
core functions. This is non-standard, but some apps expect it.
|
|
Individual drivers still need to support and enable the extension.
|
|
These extensions allow an application to make a context current by
passing EGL_NO_SURFACE for the write and read surface in the call to
eglMakeCurrent. The motivation is that applications that only want to
render to client API targets (such as OpenGL framebuffer objects)
should not need to create a throw-away EGL surface just to get a
current context.
|
|
|
|
Driver loading is now splitted into two stages. In the first stage, an
_EGLModule is created for each driver: user driver, default drivers, and
all files in the search directories that start with "egl_". Modules are
not loaded at this stage.
In the second stage, each module is loaded to initialize a display. The
process stops at the first module that can initialize the display.
If eglGetProcAddress is called before eglInitialize, the same code path
will be taken to find the first module that supports
EGL_DEFAULT_DISPLAY. Because we do not want to initialize the display,
drv->Probe is used instead in this case.
|
|
Fixes the build on Windows.
|
|
The extension defines eglGetDRMDisplay that creates an EGLDisplay from a
DRM fd. Calling eglCreateWindowSurace or eglCreatePixmapSurface with
such displays will generate EGL_BAD_NATIVE_WINDOW or
EGL_BAD_NATIVE_PIXMAP.
|
|
This commit introduces type-safe platform displays internally. A
platform display consists of a generic pointer and an enum that
specifies the platform.
An EGLDisplay is created from a platform display. Native displays
become platform displays whose platform is determined by
_eglGetNativePlatform(). Platform windows and pixmaps may also be
introduced if needed.
|
|
Fix several portability issues and add SConscript for Windows build.
|
|
|
|
This extension adds a new function which provides an alternative to
eglSwapBuffers. eglSwapBuffersRegionNOK accepts two new parameters in
addition to those in eglSwapBuffers. The new parameters consist of a
pointer to a list of 4-integer blocks defining rectangles (x, y,
width, height) and an integer specifying the number of rectangles in
the list.
|
|
When there is no user driver or any matching display drivers we fall
back to the default driver. This patch lets us have a list of default
drivers instead of just one. The drivers are loaded in turn and we
attempt to initialize the display. If it fails we unload the driver
and move on to the next one.
Compared to the display driver mechanism, this avoids loading a number
of drivers and then only using one. Also, we call Initialize to see
if the driver will work instead of relying on Probe. To know for sure
that a driver will work, Probe really have to do a full Initialize, so
we will just use Initialize directly.
|
|
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.
|
|
Merge _eglNewDisplay and _eglLinkDisplay into _eglFindDisplay. Remove
unused _eglUnlinkDisplay.
|
|
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.
|
|
Replace all uses of _EGL_DECLARE_* and _eglCheck* by _EGL_CHECK_*.
|
|
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.
|
|
Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
|
|
MakeCurrent unbinds the current context of the current API. Modify the
current API to make sure all contexts are correctly unbound.
|
|
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.
|
|
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.
|
|
_eglCloseDriver is no-op and _eglOpenDriver does nothing but call
_eglMatchDriver. Export _eglMatchDriver directly.
|
|
They have little use in drivers since drivers need to work for multiple
current contexts.
|
|
There may be multiple bound contexts that should be unbound.
|
|
Rename Native*Type to EGLNative*Type.
|
|
Individual drivers still need to implement the API hooks.
|
|
Update to the current versions found at
http://www.khronos.org/registry/egl/. There is one modification in
khrplatform.h for GCC visibility.
|
|
Turn _EGLSurface and _EGLContext into _EGLResource so that they can be
managed uniformly.
|
|
Replace the use of _eglPreloadDriver by _eglPreloadDrivers. The latter
supports EGL_DISPLAY which have a better chance to "just work".
|
|
The rest of the driver API has it as the first argument. It should be
there so that a driver has access to itself.
|
|
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>
|
|
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>
|
|
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>
|
|
Now that display and surface hash tables are moved out, _eglGlobal can
be initialized statically.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
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 <olvaffe@gmail.com>
|