diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index a5cab68..16c5dfd 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -767,6 +767,8 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp) EGLBoolean ret = EGL_FALSE; struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); + _eglLog(_EGL_DEBUG, "%s %p %p (dri2_dpy=%s)", __func__, drv, disp, dri2_dpy); + /* In the case where the application calls eglMakeCurrent(context1), * eglTerminate, then eglInitialize again (without a call to eglReleaseThread * or eglMakeCurrent(NULL) before that), dri2_dpy structure is still @@ -855,6 +857,8 @@ dri2_display_release(_EGLDisplay *disp) { struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); unsigned i; + _eglLog(_EGL_DEBUG, "%s %p %d", __func__, disp, dri2_dpy->ref_count); + assert(dri2_dpy->ref_count > 0); dri2_dpy->ref_count--; @@ -926,6 +930,8 @@ dri2_display_release(_EGLDisplay *disp) { static EGLBoolean dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp) { + _eglLog(_EGL_DEBUG, "%s %p %p", __func__, drv, disp); + /* Release all non-current Context/Surfaces. */ _eglReleaseDisplayResources(drv, disp); @@ -1251,6 +1257,9 @@ dri2_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf, __DRIcontext *cctx; EGLBoolean unbind; + _eglLog(_EGL_DEBUG, "%s %p %p %p %p %p", __func__, drv, disp, dsurf, + rsurf, ctx); + if (!dri2_dpy) return _eglError(EGL_NOT_INITIALIZED, "eglMakeCurrent"); @@ -1260,6 +1269,9 @@ dri2_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf, return EGL_FALSE; } + _eglLog(_EGL_DEBUG, "%s old %p %p %p", __func__, + old_ctx, old_dsurf, old_rsurf); + /* flush before context switch */ if (old_ctx && dri2_drv->glFlush) dri2_drv->glFlush();