summaryrefslogtreecommitdiffstats
path: root/src/glx/dri3_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/dri3_glx.c')
-rw-r--r--src/glx/dri3_glx.c14
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");
}
}