From: Adam Jackson Date: Thu, 9 Nov 2017 21:57:30 +0000 (-0500) Subject: glx/drisw: Fix glXMakeCurrent(dpy, None, ctx) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=033cfb17db85b38bc012d74f30f6c92cddf85216;p=mesa.git glx/drisw: Fix glXMakeCurrent(dpy, None, ctx) This is perfectly legal in GL 3.0+. Fixes piglit/glx-create-context-current-no-framebuffer. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Tapani Pälli Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson --- 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;