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.
This commit is contained in:
Jason Ekstrand
2015-06-09 11:40:22 -07:00
parent 3a38b0db5f
commit 999b56c507
+2 -2
View File
@@ -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;