summaryrefslogtreecommitdiffstats
path: root/src/glx/drisw_glx.c
diff options
context:
space:
mode:
authorAdam Jackson <[email protected]>2017-11-09 16:57:30 -0500
committerAdam Jackson <[email protected]>2017-11-13 10:39:48 -0500
commit033cfb17db85b38bc012d74f30f6c92cddf85216 (patch)
tree0fd3a4059f5be011e6733889ea7b0db8c56113dd /src/glx/drisw_glx.c
parentbc1bc6f512f1ab9fd34086a93fbbc591cd310e79 (diff)
glx/drisw: Fix glXMakeCurrent(dpy, None, ctx)
This is perfectly legal in GL 3.0+. Fixes piglit/glx-create-context-current-no-framebuffer. Cc: [email protected] Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
Diffstat (limited to 'src/glx/drisw_glx.c')
-rw-r--r--src/glx/drisw_glx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 2f0675addb4..df2467a5c2d 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -255,11 +255,9 @@ drisw_bind_context(struct glx_context *context, struct glx_context *old,
driReleaseDrawables(&pcp->base);
- if (pdraw == NULL || pread == NULL)
- return GLXBadDrawable;
-
if ((*psc->core->bindContext) (pcp->driContext,
- pdraw->driDrawable, pread->driDrawable))
+ pdraw ? pdraw->driDrawable : NULL,
+ pread ? pread->driDrawable : NULL))
return Success;
return GLXBadContext;