summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2019-07-02 15:32:15 +0100
committerJason Ekstrand <[email protected]>2019-08-08 12:10:39 -0500
commitc52c54a746eee5f984a0f72061a588fb0d628afd (patch)
tree313a0a431c724995c9a9e2079c22cda437969a61 /src
parent024a46a4079f947cd8760577b83af0c861451c42 (diff)
anv,i965,iris: deduplicate setting of total_shared
v5: add patch Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_program.c2
-rw-r--r--src/intel/compiler/brw_fs.cpp1
-rw-r--r--src/intel/vulkan/anv_pipeline.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_cs.c2
4 files changed, 1 insertions, 6 deletions
diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c
index 48b9f4397c9..b901f393fb8 100644
--- a/src/gallium/drivers/iris/iris_program.c
+++ b/src/gallium/drivers/iris/iris_program.c
@@ -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);
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index 9bc0cfb27ed..1a45a0f63d8 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -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];
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index c6fad1334f4..87160aba802 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -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);
diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c
index d486f4ce8b9..183ffbf22bb 100644
--- a/src/mesa/drivers/dri/i965/brw_cs.c
+++ b/src/mesa/drivers/dri/i965/brw_cs.c
@@ -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);