intel/fs: Generate multiple CS SIMD variants for variable group size
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 21 May 2020 08:56:54 +0000 (01:56 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 28 May 2020 01:16:31 +0000 (18:16 -0700)
commit90ec26a800ca7d24237b9df9b2549452f4aa9946
tree96d8b819beda1b1dc143c52d94601afe45bd4c8c
parent9b8347c98842621a621746ec5718c95d297876c9
intel/fs: Generate multiple CS SIMD variants for variable group size

This will make the GL drivers pick the right SIMD variant for a given
group size set during dispatch.  The heuristic implemented in
brw_cs_simd_size_for_group_size() is the same as in brw_compile_cs().

The cs_prog_data::simd_size field was removed.  The generated SIMD
sizes are marked in a bitmask, which is already used via
brw_cs_simd_size_for_group_size() by the drivers.

When in variable group size, it is OK if larger SIMD shader spill,
since we'd need it for the cases where the smaller one can't hold all
the invocations.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5142>
src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_fs.cpp