iris: drop unnecessary param[] setup from iris_setup_uniforms
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 9 Nov 2018 08:04:19 +0000 (00:04 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:09 +0000 (10:26 -0800)
the backend just considers these dead anyway

src/gallium/drivers/iris/iris_program.c

index fdb29df55d7a70f7856767fbf5f81b5374fb6b01..e3faeabb3eed230058d045d97a71c802f98c31f3 100644 (file)
@@ -410,23 +410,15 @@ iris_setup_uniforms(const struct brw_compiler *compiler,
                     nir_shader *nir,
                     struct brw_stage_prog_data *prog_data)
 {
-   prog_data->nr_params = nir->num_uniforms;
    /* The intel compiler assumes that num_uniforms is in bytes. For
     * scalar that means 4 bytes per uniform slot.
     *
     * Ref: brw_nir_lower_uniforms, type_size_scalar_bytes.
     */
    nir->num_uniforms *= 4;
-   prog_data->param = rzalloc_array(mem_ctx, uint32_t, prog_data->nr_params);
 
-   nir_foreach_variable(var, &nir->uniforms) {
-      const unsigned components = glsl_get_components(var->type);
-
-      for (unsigned i = 0; i < components; i++) {
-         prog_data->param[var->data.driver_location] =
-            var->data.driver_location;
-      }
-   }
+   prog_data->nr_params = 0;
+   prog_data->param = rzalloc_array(mem_ctx, uint32_t, 1);
 
    // XXX: vs clip planes?
    if (nir->info.stage != MESA_SHADER_COMPUTE)