summaryrefslogtreecommitdiffstats
path: root/src/glx/dri2_glx.c
diff options
context:
space:
mode:
authorGrigori Goronzy <[email protected]>2017-08-03 20:07:58 +0200
committerAdam Jackson <[email protected]>2019-03-12 19:12:21 -0400
commitacfd88204e886e671da97b895fd2d1ee39b61256 (patch)
tree811416e4fb64af31378e621ba06ee9e37d299378 /src/glx/dri2_glx.c
parentae77f1236862e73c1ac250898924c648d481bda4 (diff)
glx: add support for GLX_ARB_create_context_no_error (v3)
v2: Only reject no-error contexts for too-old GL if we're actually trying to create a no-error context (Adam Jackson) v3: Fix share contexts (Adam Jackson) Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glx/dri2_glx.c')
-rw-r--r--src/glx/dri2_glx.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index d8c5ba25f04..d6a543c8da0 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -263,6 +263,10 @@ dri2_create_context_attribs(struct glx_screen *base,
&api, &reset, &release, error))
goto error_exit;
+ if (!dri2_check_no_error(flags, shareList, major_ver, error)) {
+ goto error_exit;
+ }
+
/* Check the renderType value */
if (!validate_renderType_against_config(config_base, renderType))
goto error_exit;
@@ -314,6 +318,9 @@ dri2_create_context_attribs(struct glx_screen *base,
*/
pcp->base.renderType = renderType;
+ if (flags & __DRI_CTX_FLAG_NO_ERROR)
+ pcp->base.noError = GL_TRUE;
+
pcp->driContext =
(*psc->dri2->createContextAttribs) (psc->driScreen,
api,
@@ -1164,6 +1171,14 @@ dri2BindExtensions(struct dri2_screen *psc, struct glx_display * priv,
__glXEnableDirectExtension(&psc->base,
"GLX_ARB_create_context_robustness");
+ /* DRI2 version 3 is also required because
+ * GLX_ARB_create_context_no_error requires GLX_ARB_create_context.
+ */
+ if (psc->dri2->base.version >= 3
+ && strcmp(extensions[i]->name, __DRI2_NO_ERROR) == 0)
+ __glXEnableDirectExtension(&psc->base,
+ "GLX_ARB_create_context_no_error");
+
/* DRI2 version 3 is also required because GLX_MESA_query_renderer
* requires GLX_ARB_create_context_profile.
*/