intel/cs: Grow prog_data::param on-demand for thread_local_id_index

Instead of making the caller of brw_compile_cs add something to the
param array for thread_local_id_index, just add it on-demand in
brw_nir_intrinsics and grow the array.  This is now safe to do because
everyone is now using ralloc for prog_data::param.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Jason Ekstrand
2017-09-29 10:37:40 -07:00
parent b1d1b7222a
commit 6bcc5c0c75
4 changed files with 9 additions and 22 deletions

View File

@@ -409,10 +409,6 @@ anv_pipeline_compile(struct anv_pipeline *pipeline,
pipeline->needs_data_cache = true;
}
if (stage == MESA_SHADER_COMPUTE)
((struct brw_cs_prog_data *)prog_data)->thread_local_id_index =
prog_data->nr_params++; /* The CS Thread ID uniform */
if (nir->info.num_ssbos > 0)
pipeline->needs_data_cache = true;