diff options
author | Neil Roberts <[email protected]> | 2014-10-01 20:00:48 +0100 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2017-11-06 16:09:02 -0500 |
commit | ba7679f48d6414c16655cb41689f2214630f04e5 (patch) | |
tree | 009fea15d85b6b4604e96aff477386a0e423fd67 /src/glx/dri3_glx.c | |
parent | b89067c84faed94b2b31cdebf2cc7ecfc41952f2 (diff) |
glx: Implement GLX_ARB_context_flush_control
Reviewed-by: Adam Jackson <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Signed-off-by: Neil Roberts <[email protected]>
Diffstat (limited to 'src/glx/dri3_glx.c')
-rw-r--r-- | src/glx/dri3_glx.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index b79fec7335c..d613073994c 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -235,7 +235,8 @@ dri3_create_context_attribs(struct glx_screen *base, uint32_t flags = 0; unsigned api; int reset = __DRI_CTX_RESET_NO_NOTIFICATION; - uint32_t ctx_attribs[2 * 5]; + int release = __DRI_CTX_RELEASE_BEHAVIOR_FLUSH; + uint32_t ctx_attribs[2 * 6]; unsigned num_ctx_attribs = 0; uint32_t render_type; @@ -244,7 +245,7 @@ dri3_create_context_attribs(struct glx_screen *base, if (!dri2_convert_glx_attribs(num_attribs, attribs, &major_ver, &minor_ver, &render_type, &flags, &api, - &reset, error)) + &reset, &release, error)) goto error_exit; /* Check the renderType value */ @@ -279,6 +280,11 @@ dri3_create_context_attribs(struct glx_screen *base, ctx_attribs[num_ctx_attribs++] = reset; } + if (release != __DRI_CTX_RELEASE_BEHAVIOR_FLUSH) { + ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_RELEASE_BEHAVIOR; + ctx_attribs[num_ctx_attribs++] = release; + } + if (flags != 0) { ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_FLAGS; @@ -755,6 +761,10 @@ dri3_bind_extensions(struct dri3_screen *psc, struct glx_display * priv, if (strcmp(extensions[i]->name, __DRI2_INTEROP) == 0) psc->interop = (__DRI2interopExtension*)extensions[i]; + + if (strcmp(extensions[i]->name, __DRI2_FLUSH_CONTROL) == 0) + __glXEnableDirectExtension(&psc->base, + "GLX_ARB_context_flush_control"); } } |