intel/cs: Grow prog_data::param on-demand for thread_local_id_index
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 29 Sep 2017 17:37:40 +0000 (10:37 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 13 Oct 2017 05:39:30 +0000 (22:39 -0700)
commit6bcc5c0c75226bb89f35d7529de11182051c729e
tree0236a1b24eed496b62121dd597dd0d53ce1cfb82
parentb1d1b7222acfe45e447d1708d60b3ff98ca5a9a7
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>
src/intel/compiler/brw_fs.cpp
src/intel/compiler/brw_nir_lower_cs_intrinsics.c
src/intel/vulkan/anv_pipeline.c
src/mesa/drivers/dri/i965/brw_cs.c