asahi: add has_scratch to shader key

some stages are unspillable

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 12:22:40 -04:00
committed by Marge Bot
parent 9445005c87
commit 94b9200042
2 changed files with 4 additions and 0 deletions

View File

@@ -230,6 +230,9 @@ struct agx_shader_key {
/* Library routines to link against */
const nir_shader *libagx;
/* Whether scratch memory is available in the given shader stage */
bool has_scratch;
union {
struct agx_vs_shader_key vs;
struct agx_fs_shader_key fs;

View File

@@ -1804,6 +1804,7 @@ agx_compile_nir(struct agx_device *dev, nir_shader *nir,
dev->params.num_clusters_total > 1) ||
dev->params.num_dies > 1;
key.libagx = dev->libagx;
key.has_scratch = true;
NIR_PASS(_, nir, agx_nir_lower_sysvals, true);
NIR_PASS(_, nir, agx_nir_layout_uniforms, compiled, &key.reserved_preamble);