Module: Mesa Branch: main Commit: a6483f043440d4a531592fb121e77316df09c2cf URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a6483f043440d4a531592fb121e77316df09c2cf
Author: Adam Jackson <[email protected]> Date: Tue Sep 13 17:41:29 2022 -0400 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18586> --- src/egl/drivers/dri2/egl_dri2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index adc272c7aca..ba3ea867528 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -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;
