anv: Reduce compute pipeline batch_data size

The batch associated with the compute pipeline only needs room for a
MEDIA_VFE_STATE. So this patch moves the batch_data to each pipeline
struct and cap the one in compute pipeline.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4040>
This commit is contained in:
Caio Marcelo de Oliveira Filho 2020-03-03 15:42:33 -08:00
parent 925df46b7e
commit 0a5053b687
3 changed files with 7 additions and 5 deletions

View File

@ -1866,8 +1866,8 @@ anv_pipeline_init(struct anv_graphics_pipeline *pipeline,
return result;
pipeline->base.batch.alloc = alloc;
pipeline->base.batch.next = pipeline->base.batch.start = pipeline->base.batch_data;
pipeline->base.batch.end = pipeline->base.batch.start + sizeof(pipeline->base.batch_data);
pipeline->base.batch.next = pipeline->base.batch.start = pipeline->batch_data;
pipeline->base.batch.end = pipeline->base.batch.start + sizeof(pipeline->batch_data);
pipeline->base.batch.relocs = &pipeline->base.batch_relocs;
pipeline->base.batch.status = VK_SUCCESS;

View File

@ -3171,7 +3171,6 @@ struct anv_pipeline {
struct anv_batch batch;
struct anv_reloc_list batch_relocs;
uint32_t batch_data[512];
void * mem_ctx;
@ -3186,6 +3185,8 @@ struct anv_pipeline {
struct anv_graphics_pipeline {
struct anv_pipeline base;
uint32_t batch_data[512];
anv_cmd_dirty_mask_t dynamic_state_mask;
struct anv_dynamic_state dynamic_state;
@ -3238,6 +3239,7 @@ struct anv_compute_pipeline {
struct anv_shader_bin * cs;
uint32_t cs_right_mask;
uint32_t batch_data[9];
uint32_t interface_descriptor_data[8];
};

View File

@ -2242,8 +2242,8 @@ compute_pipeline_create(
return result;
}
pipeline->base.batch.alloc = alloc;
pipeline->base.batch.next = pipeline->base.batch.start = pipeline->base.batch_data;
pipeline->base.batch.end = pipeline->base.batch.start + sizeof(pipeline->base.batch_data);
pipeline->base.batch.next = pipeline->base.batch.start = pipeline->batch_data;
pipeline->base.batch.end = pipeline->base.batch.start + sizeof(pipeline->batch_data);
pipeline->base.batch.relocs = &pipeline->base.batch_relocs;
pipeline->base.batch.status = VK_SUCCESS;