intel/compiler: Replace cs_prog_data->push.total with a helper
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Sat, 21 Mar 2020 04:02:06 +0000 (21:02 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fri, 10 Apr 2020 02:23:12 +0000 (19:23 -0700)
commitc54fc0d07b1a92e065000c1301971b93439595e2
treec200851966f48729825c5445c6c456afde7ee45f
parent0536ca20d757b5ca9fc9f989ba64a545ab8235d7
intel/compiler: Replace cs_prog_data->push.total with a helper

The push.total field had three values but only one was directly
used (size).  Replace it with a helper function that explicitly takes
the cs_prog_data and the number of threads -- and use that in the
drivers.

This is a preparation for ARB_compute_variable_group_size where the
number of threads (hence the total size for push constants) is not
defined at compile time (not cs_prog_data->threads).

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4504>
src/gallium/drivers/iris/iris_program.c
src/gallium/drivers/iris/iris_state.c
src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_fs.cpp
src/intel/vulkan/anv_cmd_buffer.c
src/mesa/drivers/dri/i965/gen6_constant_state.c
src/mesa/drivers/dri/i965/genX_state_upload.c