intel/devinfo: Add devinfo->max_scratch_ids
authorJordan Justen <jordan.l.justen@intel.com>
Wed, 8 Sep 2021 23:54:57 +0000 (16:54 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Mon, 13 Sep 2021 20:26:51 +0000 (13:26 -0700)
commitc7d8a692499c692d322d90f343fb99703304d8e2
treeb5135a0559788b9c9f3bba20abf6e98f4e585c93
parent32e848aeaa3ea6c6f3313c4be97e394cb095009c
intel/devinfo: Add devinfo->max_scratch_ids

This consolidates several duplicated pieces of code into devinfo.
max_scratch_ids is an array that provides the max number of threads
for the rendering and compute stages.

This fixes some exceptions missed by crocus for scratch ids on haswell
and cherryview.

It also fills out devinfo->max_scratch_ids properly for stages VS
through CS on Gfx12.5. But, functionally this should not make a
difference as Gfx12.5 already uses COMPUTE for all stages.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12799>
src/gallium/drivers/crocus/crocus_program.c
src/gallium/drivers/iris/iris_program.c
src/intel/dev/intel_device_info.c
src/intel/dev/intel_device_info.h
src/intel/vulkan/anv_allocator.c
src/mesa/drivers/dri/i965/brw_program.c