anv,i965,iris: deduplicate setting of total_shared
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 2 Jul 2019 14:32:15 +0000 (15:32 +0100)
committerJason Ekstrand <jason@jlekstrand.net>
Thu, 8 Aug 2019 17:10:39 +0000 (12:10 -0500)
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>
src/gallium/drivers/iris/iris_program.c
src/intel/compiler/brw_fs.cpp
src/intel/vulkan/anv_pipeline.c
src/mesa/drivers/dri/i965/brw_cs.c

index 48b9f4397c9170868c22434418bcf50d19d1d7ca..b901f393fb8ac33523c44376ff25b79e2d0014fd 100644 (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);
 
index 9bc0cfb27edaca11491ad354b5e6ce40b9745cd9..1a45a0f63d85385ff18ba90391d8565980bc07b6 100644 (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];
index c6fad1334f45251f178eea5a4d1b59fe9584e11d..87160aba802d8eede44587f9119fbb50620ba147 100644 (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);
index d486f4ce8b9e2c84e54fcda9f6e7f7834eea24e5..183ffbf22bbcfef6aa9cdb8eca50162d9ac12a79 100644 (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);