blob: d7ba62dd8d2f57139edebbed4599d812cab9614f [file] [log] [blame]
Neil Roberts551d4592014-03-07 18:05:47 +00001Name
2
3 MESA_configless_context
4
5Name Strings
6
7 EGL_MESA_configless_context
8
9Contact
10
11 Neil Roberts <neil.s.roberts@intel.com>
12
13Status
14
Adam Jackson0cb14282016-09-09 12:25:35 -040015 Superseded by the functionally identical EGL_KHR_no_config_context
16 extension.
Neil Roberts551d4592014-03-07 18:05:47 +000017
18Version
19
Adam Jackson0cb14282016-09-09 12:25:35 -040020 Version 2, September 9, 2016
Neil Roberts551d4592014-03-07 18:05:47 +000021
22Number
23
24 EGL Extension #not assigned
25
26Dependencies
27
28 Requires EGL 1.4 or later. This extension is written against the
29 wording of the EGL 1.4 specification.
30
31Overview
32
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.
39
40IP Status
41
42 Open-source; freely implementable.
43
44New Procedures and Functions
45
46 None.
47
48New Tokens
49
50 Accepted as <config> in eglCreateContext
51
52 EGL_NO_CONFIG_MESA ((EGLConfig)0)
53
54Additions to the EGL Specification section "2.2 Rendering Contexts and Drawing
55Surfaces"
56
57 Add the following to the 3rd paragraph:
58
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
62 context."
63
64 Replace the last sentence of the 6th paragraph with:
65
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:"
70
71 Remove the last bullet point in the list of constraints.
72
73Additions to the EGL Specification section "3.7.1 Creating Rendering Contexts"
74
75 Replace the paragraph starting "If config is not a valid EGLConfig..."
76 with
77
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
85 EGL_OPENGL_ES2_BIT).
86
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
93 it is first bound."
94
95Additions to the EGL Specification section "3.7.3 Binding Contexts and
96Drawables"
97
98 Replace the first bullet point with the following:
99
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."
102
103 Add a second bullet point after that:
104
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."
107
108Issues
109
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
112 surface?
113
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.
120
121 Future extensions may specify required behavior in this case.
122
123Revision History
124
Adam Jackson0cb14282016-09-09 12:25:35 -0400125 Version 2, September 9, 2016
126 Defer to EGL_KHR_no_config_context (Adam Jackson)
127
Neil Roberts551d4592014-03-07 18:05:47 +0000128 Version 1, February 28, 2014
129 Initial draft (Neil Roberts)