summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-05-28 13:08:21 -0700
committerJason Ekstrand <[email protected]>2015-05-28 13:08:21 -0700
commit2dc0f7fe5b447f9b0cb5a9e8bb7a867cfe6951e9 (patch)
treedb5e26ffb57e47bba11c565d763b14693ed3d63c /src
parent8cf932fd254b3c35e93b2898fdda95f611ea9f7a (diff)
vk/device: Actually destroy batch buffers
Diffstat (limited to 'src')
-rw-r--r--src/vulkan/device.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vulkan/device.c b/src/vulkan/device.c
index 9bd3f60bfde..fa913677403 100644
--- a/src/vulkan/device.c
+++ b/src/vulkan/device.c
@@ -2249,6 +2249,14 @@ anv_cmd_buffer_destroy(struct anv_device *device,
assert(obj_type == VK_OBJECT_TYPE_COMMAND_BUFFER);
+ /* Destroy all of the batch buffers */
+ struct anv_batch_bo *bbo = cmd_buffer->last_batch_bo;
+ while (bbo->prev_batch_bo) {
+ struct anv_batch_bo *prev = bbo->prev_batch_bo;
+ anv_batch_bo_destroy(bbo, cmd_buffer->device);
+ bbo = prev;
+ }
+
anv_bo_pool_free(&device->batch_bo_pool, &cmd_buffer->surface_bo);
anv_reloc_list_finish(&cmd_buffer->surface_relocs, device);
anv_state_stream_finish(&cmd_buffer->surface_state_stream);