summaryrefslogtreecommitdiffstats
path: root/src/glx/dri_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/dri_common.c')
-rw-r--r--src/glx/dri_common.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index e2bbd48d3a5..3b82309fa20 100644
--- a/src/glx/dri_common.c
+++ b/src/glx/dri_common.c
@@ -475,7 +475,7 @@ _X_HIDDEN bool
dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
unsigned *major_ver, unsigned *minor_ver,
uint32_t *render_type, uint32_t *flags, unsigned *api,
- int *reset, unsigned *error)
+ int *reset, int *release, unsigned *error)
{
unsigned i;
bool got_profile = false;
@@ -485,6 +485,7 @@ dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
*minor_ver = 0;
*render_type = GLX_RGBA_TYPE;
*reset = __DRI_CTX_RESET_NO_NOTIFICATION;
+ *release = __DRI_CTX_RELEASE_BEHAVIOR_FLUSH;
*flags = 0;
*api = __DRI_API_OPENGL;
@@ -530,6 +531,19 @@ dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
return false;
}
break;
+ case GLX_CONTEXT_RELEASE_BEHAVIOR_ARB:
+ switch (attribs[i * 2 + 1]) {
+ case GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB:
+ *release = __DRI_CTX_RELEASE_BEHAVIOR_NONE;
+ break;
+ case GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB:
+ *release = __DRI_CTX_RELEASE_BEHAVIOR_FLUSH;
+ break;
+ default:
+ *error = __DRI_CTX_ERROR_UNKNOWN_ATTRIBUTE;
+ return false;
+ }
+ break;
default:
/* If an unknown attribute is received, fail.
*/