diff options
author | Grigori Goronzy <[email protected]> | 2017-08-03 20:07:58 +0200 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2019-03-12 19:12:21 -0400 |
commit | acfd88204e886e671da97b895fd2d1ee39b61256 (patch) | |
tree | 811416e4fb64af31378e621ba06ee9e37d299378 /src/glx/dri3_glx.c | |
parent | ae77f1236862e73c1ac250898924c648d481bda4 (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/dri3_glx.c')
-rw-r--r-- | src/glx/dri3_glx.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index 298adc80ef1..9d023341e6b 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -259,6 +259,10 @@ dri3_create_context_attribs(struct glx_screen *base, &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, render_type)) goto error_exit; @@ -303,6 +307,9 @@ dri3_create_context_attribs(struct glx_screen *base, * GLX_CONTEXT_*_BIT values. */ ctx_attribs[num_ctx_attribs++] = flags; + + if (flags & __DRI_CTX_FLAG_NO_ERROR) + pcp->base.noError = GL_TRUE; } pcp->driContext = @@ -780,6 +787,10 @@ dri3_bind_extensions(struct dri3_screen *psc, struct glx_display * priv, __glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_robustness"); + if (strcmp(extensions[i]->name, __DRI2_NO_ERROR) == 0) + __glXEnableDirectExtension(&psc->base, + "GLX_ARB_create_context_no_error"); + if (strcmp(extensions[i]->name, __DRI2_RENDERER_QUERY) == 0) { psc->rendererQuery = (__DRI2rendererQueryExtension *) extensions[i]; __glXEnableDirectExtension(&psc->base, "GLX_MESA_query_renderer"); |