From ecb28b280251b0109ab974eeda7af82e58699845 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 9 Nov 2018 00:04:19 -0800 Subject: [PATCH] iris: drop unnecessary param[] setup from iris_setup_uniforms the backend just considers these dead anyway --- src/gallium/drivers/iris/iris_program.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index fdb29df55d7..e3faeabb3ee 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -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) -- 2.30.2