diff options
author | Adam Jackson <ajax@redhat.com> | 2019-04-30 13:40:43 -0400 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2019-05-01 14:38:09 +0000 |
commit | 007d812a832cf32b02542bbae13a3997e655171a (patch) | |
tree | 9a03a5a92b314df0a3c35852be1e27fac2ec8ba0 /glx | |
parent | a2302de6feb43dd10b159661d5fe7d2036c6c020 (diff) |
glx: Fix GLX_CONTEXT_RELEASE_BEHAVIOR_ARB handling
None of this was getting compiled because we hadn't defined the macro
(and aren't getting them from <GL/glxext.h> because reasons). Fix that.
Fixes: xorg/xserver#684
Diffstat (limited to 'glx')
-rw-r--r-- | glx/createcontext.c | 6 | ||||
-rw-r--r-- | glx/glxext.h | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/glx/createcontext.c b/glx/createcontext.c index 24b02ddfb..63710e145 100644 --- a/glx/createcontext.c +++ b/glx/createcontext.c @@ -88,9 +88,7 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc) int minor_version = 0; uint32_t flags = 0; uint32_t render_type = GLX_RGBA_TYPE; -#ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB uint32_t flush = GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB; -#endif __GLXcontext *ctx = NULL; __GLXcontext *shareCtx = NULL; __GLXscreen *glxScreen; @@ -201,14 +199,12 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc) break; -#ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB case GLX_CONTEXT_RELEASE_BEHAVIOR_ARB: flush = attribs[2 * i + 1]; if (flush != GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB && flush != GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB) return BadValue; break; -#endif case GLX_SCREEN: /* Only valid for GLX_EXT_no_config_context */ @@ -348,9 +344,7 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc) ctx->isDirect = req->isDirect; ctx->renderMode = GL_RENDER; ctx->resetNotificationStrategy = reset; -#ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB ctx->releaseBehavior = flush; -#endif /* Add the new context to the various global tables of GLX contexts. */ diff --git a/glx/glxext.h b/glx/glxext.h index 5ad497e4a..abaf1225c 100644 --- a/glx/glxext.h +++ b/glx/glxext.h @@ -50,6 +50,11 @@ #ifndef GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT #define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 #endif +#ifndef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB +#define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 +#define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0 +#define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 +#endif extern void __glXFlushContextCache(void); |