anv/x11: Free swapchain images and memory on destroy

This commit is contained in:
Kristian Høgsberg Kristensen
2016-02-22 10:19:43 -08:00
parent 08b408311c
commit 353d5bf286

View File

@@ -535,7 +535,11 @@ x11_swapchain_destroy(struct anv_swapchain *anv_chain,
cookie = xcb_free_pixmap(chain->conn, image->pixmap);
xcb_discard_reply(chain->conn, cookie.sequence);
/* TODO: Delete images and free memory */
anv_DestroyImage(anv_device_to_handle(chain->base.device),
anv_image_to_handle(image->image), pAllocator);
anv_FreeMemory(anv_device_to_handle(chain->base.device),
anv_device_memory_to_handle(image->memory), pAllocator);
}
anv_free2(&chain->base.device->alloc, pAllocator, chain);