agx: set nr_preamble_gprs for preamble scratch

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
This commit is contained in:
Alyssa Rosenzweig
2024-01-26 14:26:37 -04:00
committed by Marge Bot
parent 94b9200042
commit f97b041e87
+4 -1
View File
@@ -2878,8 +2878,11 @@ agx_compile_function_nir(nir_shader *nir, nir_function_impl *impl,
unsigned nr_gprs = ctx->max_reg + 1;
/* If the preamble uses scratch (due to spilling), we need to set maximal
* GPRs. Do it here so the driver doesn't have to worry about it.
*/
if (impl->function->is_preamble)
out->nr_preamble_gprs = nr_gprs;
out->nr_preamble_gprs = ctx->scratch_size ? 256 : nr_gprs;
else
out->nr_gprs = nr_gprs;