summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/platform_x11_dri3.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/drivers/dri2/platform_x11_dri3.c
index c3c9c2dd45d..e1967422f0a 100644
--- a/src/egl/drivers/dri2/platform_x11_dri3.c
+++ b/src/egl/drivers/dri2/platform_x11_dri3.c
@@ -107,12 +107,17 @@ static const struct loader_dri3_vtable egl_dri3_vtable = {
static EGLBoolean
dri3_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri3_egl_surface *dri3_surf = dri3_egl_surface(surf);
+ xcb_drawable_t drawable = dri3_surf->loader_drawable.drawable;
(void) drv;
loader_dri3_drawable_fini(&dri3_surf->loader_drawable);
+ if (surf->Type == EGL_PBUFFER_BIT)
+ xcb_free_pixmap (dri2_dpy->conn, drawable);
+
dri2_fini_surface(surf);
free(surf);