egl/dri2: Fix some thinkos in old context release

All of the objects here should be relative to the old context / display
/ surfaces. Calling disp->unbindContext() on a context that disp did not
create is likely to go poorly.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18586>
This commit is contained in:
Adam Jackson
2022-09-13 17:41:29 -04:00
committed by Marge Bot
parent 7a744aa318
commit a6483f0434
+2 -2
View File
@@ -1822,10 +1822,10 @@ dri2_make_current(_EGLDisplay *disp, _EGLSurface *dsurf,
old_dri2_dpy->vtbl->set_shared_buffer_mode(old_disp, old_dsurf, false);
}
dri2_dpy->core->unbindContext(old_cctx);
old_dri2_dpy->core->unbindContext(old_cctx);
if (old_dsurf)
dri2_surf_update_fence_fd(old_ctx, disp, old_dsurf);
dri2_surf_update_fence_fd(old_ctx, old_disp, old_dsurf);
}
ddraw = (dsurf) ? dri2_dpy->vtbl->get_dri_drawable(dsurf) : NULL;