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 <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson
2017-11-09 16:57:30 -05:00
parent bc1bc6f512
commit 033cfb17db

View File

@@ -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;