3 MESA_configless_context
7 EGL_MESA_configless_context
11 Neil Roberts
<neil.s.roberts@intel.com
>
15 Superseded by the functionally identical EGL_KHR_no_config_context
20 Version 2, September
9, 2016
24 EGL Extension
#not assigned
28 Requires EGL
1.4 or later. This extension is written against the
29 wording of the EGL
1.4 specification.
33 This extension provides a means to use a single context to render to
34 multiple surfaces which have different EGLConfigs. Without this extension
35 the EGLConfig
for every surface used by the context must be compatible
36 with the one used by the context. The only way to render to surfaces with
37 different formats would be to create multiple contexts but this is
38 inefficient with modern GPUs where this restriction is unnecessary.
42 Open
-source; freely implementable.
44 New Procedures and Functions
50 Accepted as
<config
> in eglCreateContext
52 EGL_NO_CONFIG_MESA
((EGLConfig
)0)
54 Additions to the EGL Specification section "
2.2 Rendering Contexts and Drawing
57 Add the following to the
3rd paragraph
:
59 "EGLContexts can also optionally be created with respect to an EGLConfig
60 depending on the parameters used at creation
time. If a config is provided
61 then additional restrictions apply on what surfaces can be used with the
64 Replace the last sentence of the
6th paragraph with
:
66 "In order
for a context to be compatible with a surface they both must have
67 been created with respect to the same EGLDisplay. If the context was
68 created without respect to an EGLConfig
then there are no further
69 constraints. Otherwise they are only compatible
if:"
71 Remove the last bullet point
in the list of constraints.
73 Additions to the EGL Specification section "
3.7.1 Creating Rendering Contexts"
75 Replace the paragraph starting "If config is not a valid EGLConfig..."
78 "The config argument can either be a valid EGLConfig or EGL_NO_CONFIG_MESA.
79 If it is neither of these
then an EGL_BAD_CONFIG error is generated. If a
80 valid config is passed
then the error will also be generated
if the config
81 does not support the requested client API
(this includes requesting
82 creation of an OpenGL ES
1.x context when the EGL_RENDERABLE_TYPE
83 attribute of config does not contain EGL_OPENGL_ES_BIT
, or creation of an
84 OpenGL ES
2.x context when the attribute does not contain
87 Passing EGL_NO_CONFIG_MESA will create a configless context. When a
88 configless context is used with the OpenGL API it can be assumed that the
89 initial values of the context's state will be decided when the context is
90 first made current. In particular this means that the decision of whether
91 to use GL_BACK or GL_FRONT
for the initial value of the first output
in
92 glDrawBuffers will be decided based on the config of the draw surface when
95 Additions to the EGL Specification section "
3.7.3 Binding Contexts and
98 Replace the first bullet point with the following
:
100 "
* If draw or
read are not compatible with ctx as described
in section
2.2,
101 then an EGL_BAD_MATCH error is generated."
103 Add a second bullet point after that
:
105 "
* If draw and
read are not compatible with each other as described
in
106 section
2.2, then an EGL_BAD_MATCH error is generated."
110 1. What happens when an OpenGL context with a double
-buffered surface and
111 draw buffer
set to GL_BACK is made current with a single
-buffered
114 NOT RESOLVED
: There are a few options here. An implementation can
115 raise an error
, change the drawbuffer state to GL_FRONT or just
do
116 nothing
, expecting the application to
set GL_FRONT drawbuffer before
117 drawing. However
, this extension deliberately does not specify any
118 required behavior
in this corner
case and applications should avoid
119 mixing single
- and double
-buffered surfaces with configless contexts.
121 Future extensions may specify required behavior
in this
case.
125 Version 2, September
9, 2016
126 Defer to EGL_KHR_no_config_context
(Adam Jackson
)
128 Version 1, February
28, 2014
129 Initial draft
(Neil Roberts
)