intel: Use devinfo->urb.min_entries[GS and TCS] for setting URB configs

We were not using the minimum values from devinfo for anything.  For
tessellation control, the minimum value is 0, so we continue taking
MAX2 of that with 1 when tessellation is enabled so we have at least
something guaranteed to be present.  For geometry, the minimum value
is already non-zero (and updated by the previous patch).

This will have the side-effect of raising the minimum number of URB
entries for geometry stages.  This is currently not known to fix
anything, but should be more closely following the documentation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
This commit is contained in:
Kenneth Graunke 2025-02-25 21:27:21 -08:00
parent 404ed1d153
commit 1dfed59c49

View file

@ -122,17 +122,11 @@ intel_get_urb_config(const struct intel_device_info *devinfo,
[MESA_SHADER_VERTEX] = tess_present && devinfo->ver == 8 ?
192 : devinfo->urb.min_entries[MESA_SHADER_VERTEX],
/* There are two constraints on the minimum amount of URB space we can
* allocate:
*
* (1) We need room for at least 2 URB entries, since we always operate
* the GS in DUAL_OBJECT mode.
*
* (2) We can't allocate less than nr_gs_entries_granularity.
*/
[MESA_SHADER_GEOMETRY] = gs_present ? 2 : 0,
[MESA_SHADER_GEOMETRY] = gs_present ?
devinfo->urb.min_entries[MESA_SHADER_GEOMETRY] : 0,
[MESA_SHADER_TESS_CTRL] = tess_present ? 1 : 0,
[MESA_SHADER_TESS_CTRL] = tess_present ?
MAX2(devinfo->urb.min_entries[MESA_SHADER_TESS_CTRL], 1) : 0,
[MESA_SHADER_TESS_EVAL] = tess_present ?
devinfo->urb.min_entries[MESA_SHADER_TESS_EVAL] : 0,