summaryrefslogtreecommitdiff
path: root/src/glx/glxcmds.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2017-11-14 15:13:06 -0500
committerMarge Bot <eric+marge@anholt.net>2021-04-23 21:15:19 +0000
commit01ba8a8d02ba04575860570ce51fc282c9b7866e (patch)
treef1dc70946ddb42220c3517e33f903a6dde7c33d1 /src/glx/glxcmds.c
parentf9d57207a365a896a771e3b3b62351749fbd99c6 (diff)
glx: Implement GLX_EXT_no_config_context
This is the GLX counterpart to EGL_KHR_no_config_context. Contexts may now be created without reference to an fbconfig, in which case it is treated as compatible with any fbconfig (and thus any GLX drawable). Khronos: https://github.com/KhronosGroup/OpenGL-Registry/pull/102 Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Acked-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8999>
Diffstat (limited to 'src/glx/glxcmds.c')
-rw-r--r--src/glx/glxcmds.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 7a2a31ad26b..4c946a246b5 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -237,7 +237,7 @@ validate_renderType_against_config(const struct glx_config *config,
{
/* GLX_EXT_no_config_context supports any render type */
if (!config)
- return True;
+ return renderType == GLX_DONT_CARE;
switch (renderType) {
case GLX_RGBA_TYPE:
@@ -268,6 +268,9 @@ glx_context_init(struct glx_context *gc,
gc->isDirect = GL_TRUE;
gc->currentContextTag = -1;
+ if (!config)
+ gc->renderType = GLX_DONT_CARE;
+
return True;
}
@@ -1361,7 +1364,7 @@ glXGetClientString(Display * dpy, int name)
case GLX_VERSION:
return (__glXGLXClientVersion);
case GLX_EXTENSIONS:
- return (__glXGetClientExtensions());
+ return (__glXGetClientExtensions(dpy));
default:
return NULL;
}