Due to a copy+paste error, we were destroying all but the first batch or
surface state buffer. Now we destroy them all.
/* 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;
/* 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;