diff --git a/src/asahi/compiler/agx_compile.h b/src/asahi/compiler/agx_compile.h index 8ced54419bc..ca7302b8120 100644 --- a/src/asahi/compiler/agx_compile.h +++ b/src/asahi/compiler/agx_compile.h @@ -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; diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 3a8c8f7c640..1178d34c9e3 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -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);