Commit a96360a9 authored by Jeremy Huddleston Sequoia's avatar Jeremy Huddleston Sequoia
Browse files

apple: Implement applegl_unbind_context

glXMakeCurrent(dpy, None, NULL) would not correctly unbind the context
causing subsequent GLX requests to fail in peculiar ways

Signed-off-by: Jeremy Huddleston Sequoia's avatarJeremy Huddleston <>
(cherry picked from commit 5c44c134)
parent c8f2665f
......@@ -65,6 +65,24 @@ applegl_bind_context(struct glx_context *gc, struct glx_context *old,
static void
applegl_unbind_context(struct glx_context *gc, struct glx_context *new)
Display *dpy;
bool error;
/* If we don't have a context, then we have nothing to unbind */
if (!gc)
/* If we have a new context, keep this one around and remove it during bind. */
if (new)
dpy = gc->psc->dpy;
error = apple_glx_make_current_context(dpy,
(gc != &dummyContext) ? gc->driContext : NULL,
NULL, None);
apple_glx_diagnostic("%s: error %s\n", __func__, error ? "YES" : "NO");
static void
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment