r300g: add RGBA16F colorbuffer support
[mesa.git] / src / driclient / src / driclient.c
index 2d7514166faa4ef4c504be00e985f66d19437e12..dc2189afec3ee7e8dbcf8d8bfba19d75d9c0a1d4 100644 (file)
@@ -111,8 +111,23 @@ free_screen:
 
 int driDestroyScreen(dri_screen_t *dri_screen)
 {
+       Drawable        draw;
+       dri_drawable_t  *dri_draw;
+
        assert(dri_screen);
 
+       if (drmHashFirst(dri_screen->drawable_hash, &draw, (void**)&dri_draw))
+       {
+               dri_draw->refcount = 1;
+               driDestroyDrawable(dri_draw);
+
+               while (drmHashNext(dri_screen->drawable_hash, &draw, (void**)&dri_draw))
+               {
+                       dri_draw->refcount = 1;
+                       driDestroyDrawable(dri_draw);
+               }
+       }
+
        drmHashDestroy(dri_screen->drawable_hash);
        drmUnmap(dri_screen->sarea, SAREA_MAX);
        drmCloseOnce(dri_screen->fd);