Add the EGL_MESA_configless_context extension

Graphics / Mesa 3D Graphics Library / Mesa - Neil Roberts [linux.intel.com] - 12 March 2014 16:40 UTC

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.

551d459 Add the EGL_MESA_configless_context extension
docs/specs/MESA_configless_context.spec | 125 +++++++++++++++++++++++++++++
include/EGL/eglmesaext.h | 5 ++
src/egl/drivers/dri2/egl_dri2.c | 1 +
src/egl/main/eglapi.c | 2 +-
src/egl/main/eglcontext.c | 20 ++++-
src/egl/main/egldisplay.h | 1 +
src/egl/main/eglmisc.c | 1 +
src/mesa/drivers/dri/i915/intel_context.c | 6 --
src/mesa/drivers/dri/i965/brw_context.c | 6 --
src/mesa/main/context.c | 82 ++++++++++++++-----
src/mesa/main/mtypes.h | 6 ++
11 files changed, 218 insertions(+), 37 deletions(-)

Upstream: cgit.freedesktop.org


  • Share