summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-06-09 11:40:22 -0700
committerJason Ekstrand <[email protected]>2015-06-09 12:36:23 -0700
commit999b56c507fa9542725556aa9409d029fdc19c94 (patch)
treef4d7eb9788d0640d498c558512fc63cd6b1b58c4
parent3a38b0db5fc7ab732fc6d830a2787b0b3c1bb294 (diff)
vk/device: Destroy all batch buffers
Due to a copy+paste error, we were destroying all but the first batch or surface state buffer. Now we destroy them all.
-rw-r--r--src/vulkan/device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vulkan/device.c b/src/vulkan/device.c
index d6bd7899919..843c1ed61f0 100644
--- a/src/vulkan/device.c
+++ b/src/vulkan/device.c
@@ -2210,7 +2210,7 @@ anv_cmd_buffer_destroy(struct anv_device *device,
/* Destroy all of the batch buffers */
struct anv_batch_bo *bbo = cmd_buffer->last_batch_bo;
- while (bbo->prev_batch_bo) {
+ while (bbo) {
struct anv_batch_bo *prev = bbo->prev_batch_bo;
anv_batch_bo_destroy(bbo, device);
bbo = prev;
@@ -2219,7 +2219,7 @@ anv_cmd_buffer_destroy(struct anv_device *device,
/* Destroy all of the surface state buffers */
bbo = cmd_buffer->surface_batch_bo;
- while (bbo->prev_batch_bo) {
+ while (bbo) {
struct anv_batch_bo *prev = bbo->prev_batch_bo;
anv_batch_bo_destroy(bbo, device);
bbo = prev;