anv,i965,iris: deduplicate setting of total_shared

v5: add patch

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Rhys Perry 2019-07-02 15:32:15 +01:00 committed by Jason Ekstrand
parent 024a46a407
commit c52c54a746
4 changed files with 1 additions and 6 deletions

View file

@ -1727,8 +1727,6 @@ iris_compile_cs(struct iris_context *ice,
nir_shader *nir = nir_shader_clone(mem_ctx, ish->nir);
prog_data->total_shared = nir->info.cs.shared_size;
iris_setup_uniforms(compiler, mem_ctx, nir, prog_data, &system_values,
&num_system_values, &num_cbufs);

View file

@ -8250,6 +8250,7 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data,
int shader_time_index,
char **error_str)
{
prog_data->base.total_shared = src_shader->info.cs.shared_size;
prog_data->local_size[0] = src_shader->info.cs.local_size[0];
prog_data->local_size[1] = src_shader->info.cs.local_size[1];
prog_data->local_size[2] = src_shader->info.cs.local_size[2];

View file

@ -1443,8 +1443,6 @@ anv_pipeline_compile_cs(struct anv_pipeline *pipeline,
NIR_PASS_V(stage.nir, nir_lower_explicit_io,
nir_var_mem_shared, nir_address_format_32bit_offset);
stage.prog_data.cs.base.total_shared = stage.nir->info.cs.shared_size;
const unsigned *shader_code =
brw_compile_cs(compiler, pipeline->device, mem_ctx, &stage.key.cs,
&stage.prog_data.cs, stage.nir, -1, NULL);

View file

@ -71,8 +71,6 @@ brw_codegen_cs_prog(struct brw_context *brw,
ralloc_free(mem_ctx);
return false;
} else {
prog_data.base.total_shared = cp->program.info.cs.shared_size;
}
assign_cs_binding_table_offsets(devinfo, &cp->program, &prog_data);