aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx/dri_common.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2014-02-05 11:43:58 -0800
committerKristian Høgsberg <[email protected]>2014-02-06 14:23:42 -0800
commitf658150639c36eda351590e757247c56507f494f (patch)
treec4c4d95321401b55d99c320197b984f05c8b015f /src/glx/dri_common.c
parentdb54fca9b86aa124447d11d2bdbe359a2742cfd5 (diff)
glx: Pass NULL DRI drawables into the DRI driver for None GLX drawables
GLX_ARB_create_context allows making a GLX context current with None drawable and readables, but this was never implemented correctly in GLX. We would create a __DRIdrawable for the None GLX drawable and pass that to the DRI driver and that would somehow work. Now it's somehow broken. The way this should have worked is that we pass a NULL DRI drawable to the DRI driver when the GLX user calls glXMakeContextCurrent() with None for drawable and readables. https://bugs.freedesktop.org/show_bug.cgi?id=74143 Signed-off-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/glx/dri_common.c')
-rw-r--r--src/glx/dri_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index 0dd8982a18b..012c8f4ec32 100644
--- a/src/glx/dri_common.c
+++ b/src/glx/dri_common.c
@@ -392,6 +392,9 @@ driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable)
if (priv == NULL)
return NULL;
+ if (glxDrawable == None)
+ return NULL;
+
psc = priv->screens[gc->screen];
if (priv->drawHash == NULL)
return NULL;