const uint32_t batch_padding = GFX8_MI_BATCH_BUFFER_START_length * 4;
/* Cap reallocation to chunk. */
uint32_t alloc_size = MIN2(
- MAX2(batch->total_batch_size, size + batch_padding),
+ MAX2(batch->allocated_batch_size, size + batch_padding),
ANV_MAX_CMD_BUFFER_BATCH_SIZE);
VkResult result = anv_batch_bo_create(cmd_buffer, alloc_size, &new_bbo);
if (result != VK_SUCCESS)
return result;
- batch->total_batch_size += alloc_size;
+ batch->allocated_batch_size += alloc_size;
struct anv_batch_bo **seen_bbo = u_vector_add(&cmd_buffer->seen_bbos);
if (seen_bbo == NULL) {
struct anv_batch_bo *new_bbo = NULL;
/* Cap reallocation to chunk. */
uint32_t alloc_size = MIN2(
- MAX2(batch->total_batch_size, size),
+ MAX2(batch->allocated_batch_size, size),
ANV_MAX_CMD_BUFFER_BATCH_SIZE);
VkResult result = anv_batch_bo_create(cmd_buffer, alloc_size, &new_bbo);
if (result != VK_SUCCESS)
return result;
- batch->total_batch_size += alloc_size;
+ batch->allocated_batch_size += alloc_size;
struct anv_batch_bo **seen_bbo = u_vector_add(&cmd_buffer->seen_bbos);
if (seen_bbo == NULL) {
cmd_buffer->batch.alloc = &cmd_buffer->vk.pool->alloc;
cmd_buffer->batch.user_data = cmd_buffer;
- cmd_buffer->batch.total_batch_size = ANV_MIN_CMD_BUFFER_BATCH_SIZE;
+ cmd_buffer->batch.allocated_batch_size = ANV_MIN_CMD_BUFFER_BATCH_SIZE;
cmd_buffer->batch.extend_cb = anv_cmd_buffer_chain_batch;
cmd_buffer->generation_batch.alloc = &cmd_buffer->vk.pool->alloc;
cmd_buffer->generation_batch.user_data = cmd_buffer;
- cmd_buffer->generation_batch.total_batch_size = 0;
+ cmd_buffer->generation_batch.allocated_batch_size = 0;
cmd_buffer->generation_batch.extend_cb = anv_cmd_buffer_chain_generation_batch;
int success = u_vector_init_pow2(&cmd_buffer->seen_bbos, 8,
*(struct anv_batch_bo **)u_vector_add(&cmd_buffer->seen_bbos) = first_bbo;
assert(first_bbo->bo->size == ANV_MIN_CMD_BUFFER_BATCH_SIZE);
- cmd_buffer->batch.total_batch_size = first_bbo->bo->size;
+ cmd_buffer->batch.allocated_batch_size = first_bbo->bo->size;
/* Delete all generation batch bos */
list_for_each_entry_safe(struct anv_batch_bo, bbo,
}
/* And reset generation batch */
- cmd_buffer->generation_batch.total_batch_size = 0;
+ cmd_buffer->generation_batch.allocated_batch_size = 0;
cmd_buffer->generation_batch.start = NULL;
cmd_buffer->generation_batch.end = NULL;
cmd_buffer->generation_batch.next = NULL;