diff options
author | Neil Roberts <neil@linux.intel.com> | 2017-11-02 15:01:44 -0400 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-11-02 15:09:12 -0700 |
commit | d12c924d4ef8e8349b597e7c5ddcfb06879889ce (patch) | |
tree | 1bcad782382daf91d299d487e390087c9cbd1544 /src/glx/dri3_glx.c | |
parent | deffa78789cdb0d5259c38285fb7d12936c4be16 (diff) |
glx: Implement GLX_ARB_context_flush_control
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Neil Roberts <neil@linux.intel.com>
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 b79fec7335..d613073994 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"); } } |