diff options
author | Neil Roberts <neil@linux.intel.com> | 2014-03-07 18:05:47 +0000 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-03-12 14:40:47 -0700 |
commit | 551d459af421a2eb937e9e16301bb64da4624f89 (patch) | |
tree | ba2399deac65bbb2ce5d913d3936db145ff632a6 /include/EGL | |
parent | 4b17dff3e5128bef67ea79d20624e878c3b48729 (diff) |
Add the EGL_MESA_configless_context extension
This extension provides a way for an application to render to multiple
surfaces with different buffer formats without having to use multiple
contexts. An EGLContext can be created without an EGLConfig by passing
EGL_NO_CONFIG_MESA. In that case there are no restrictions on the surfaces
that can be used with the context apart from that they must be using the same
EGLDisplay.
_mesa_initialze_context can now take a NULL gl_config which will mark the
context as ‘configless’. It will memset the visual to zero in that case.
Previously the i965 and i915 drivers were explicitly creating a zeroed visual
whenever 0 is passed for the EGLConfig. Mesa needs to be aware that the
context is configless because it affects the initial value to use for
glDrawBuffer. The first time the context is bound it will set the initial
value for configless contexts depending on whether the framebuffer used is
double-buffered.
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Diffstat (limited to 'include/EGL')
-rw-r--r-- | include/EGL/eglmesaext.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/EGL/eglmesaext.h b/include/EGL/eglmesaext.h index b3229e3974..5fcc527d65 100644 --- a/include/EGL/eglmesaext.h +++ b/include/EGL/eglmesaext.h @@ -165,6 +165,11 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EG #define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */ #endif +#ifndef EGL_MESA_configless_context +#define EGL_MESA_configless_context 1 +#define EGL_NO_CONFIG_MESA ((EGLConfig)0) +#endif + #ifdef __cplusplus } #endif |