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/dri_common.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/dri_common.c')
-rw-r--r-- | src/glx/dri_common.c | 16 |
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. */ |