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