summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorKristian Høgsberg Kristensen <[email protected]>2016-02-22 10:19:43 -0800
committerKristian Høgsberg Kristensen <[email protected]>2016-02-22 16:23:47 -0800
commit353d5bf286e1509af9ec2f1b8152d1f64790b52c (patch)
treec1f083bb6111385fa256c92878735674fd2a0d19 /src/intel/vulkan
parent08b408311cb8fdbeae6d7ff5474107b0868c6ec9 (diff)
anv/x11: Free swapchain images and memory on destroy
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/anv_wsi_x11.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_wsi_x11.c b/src/intel/vulkan/anv_wsi_x11.c
index 843a6b62504..a63cb6e7c5b 100644
--- a/src/intel/vulkan/anv_wsi_x11.c
+++ b/src/intel/vulkan/anv_wsi_x11.c
@@ -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);