intel/fs: Remove min_dispatch_width spilling decision from RA
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 19 May 2020 21:37:44 +0000 (14:37 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 28 May 2020 01:16:31 +0000 (18:16 -0700)
commit10d0f39beb20c4cd6fe6d3f23a3b1d918653127a
tree967db5579b07be39c779152a0d2937ecd8cfdd8d
parent9526e14b5cca2417368a41e2fb4a5835cfcbe205
intel/fs: Remove min_dispatch_width spilling decision from RA

Move the decision one level up, let brw_compile_*() functions use the
spilling information to decide whether or not a certain width
compilation can spill (passed via run_*() functions).

The min_dispatch_width was used to compare with the dispatch_width and
decide whether "a previous shader is already available, so don't
accept spill".

This is replaced by:

- Not calling run_*() functions if it is know beforehand a smaller width
  already spilled -- since the larger width will spill and fail;

- Explicitly passing whether or not a shader is allowed to spill.  For
  the cases where the smaller width is available and haven't spilled,
  the larger width will be compiled but is only useful if it won't
  spill.

Moving the decision to this level will be useful later for variable
group size, which is a case where we want all the widths to be allowed
to spill.

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