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>
(cherry picked from commit 033cfb17db)
This commit is contained in:
Adam Jackson 2017-11-09 16:57:30 -05:00 committed by Andres Gomez
parent 2c9d72046f
commit d53558fd67

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;