emit_batch_buffer_start(batch, bbo->bo, 0);
anv_batch_bo_finish(current_bbo, batch);
+
+ /* Add the current amount of data written in the current_bbo to the command
+ * buffer.
+ */
+ cmd_buffer->total_batch_size += current_bbo->length;
}
static void
list_inithead(&cmd_buffer->batch_bos);
+ cmd_buffer->total_batch_size = 0;
+
result = anv_batch_bo_create(cmd_buffer,
ANV_MIN_CMD_BUFFER_BATCH_SIZE,
&batch_bo);
cmd_buffer->generation_batch.start = NULL;
cmd_buffer->generation_batch.end = NULL;
cmd_buffer->generation_batch.next = NULL;
+
+ cmd_buffer->total_batch_size = 0;
}
void
}
anv_batch_bo_finish(batch_bo, &cmd_buffer->batch);
+
+ /* Add the current amount of data written in the current_bbo to the command
+ * buffer.
+ */
+ cmd_buffer->total_batch_size += batch_bo->length;
}
static VkResult
}
anv_reloc_list_append(&primary->surface_relocs, &secondary->surface_relocs);
+
+ /* Add the amount of data written in the secondary buffer to the primary
+ * command buffer.
+ */
+ primary->total_batch_size += secondary->total_batch_size;
}
void
uint32_t perf_reloc_idx;
/**
- * Sum of all the anv_batch_bo sizes allocated for this command buffer.
- * Used to increase allocation size for long command buffers.
+ * Sum of all the anv_batch_bo written sizes for this command buffer
+ * including any executed secondary command buffer.
*/
uint32_t total_batch_size;