diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index 77b5f06747d..b4e4dd11c2b 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -3010,7 +3010,6 @@ agx_preprocess_nir(nir_shader *nir, const nir_shader *libagx, /* Clean up deref gunk after lowering I/O */ NIR_PASS(_, nir, nir_opt_dce); - NIR_PASS(_, nir, agx_nir_lower_texture); link_libagx(nir, libagx); diff --git a/src/asahi/compiler/agx_compile.h b/src/asahi/compiler/agx_compile.h index 98a7a444f71..8a9bc75d0a4 100644 --- a/src/asahi/compiler/agx_compile.h +++ b/src/asahi/compiler/agx_compile.h @@ -242,6 +242,7 @@ struct agx_shader_key { #define AGX_TEXTURE_FLAG_NO_CLAMP (1 << 0) bool agx_nir_lower_texture_early(nir_shader *s, bool support_lod_bias); +bool agx_nir_lower_texture(nir_shader *s); void agx_preprocess_nir(nir_shader *nir, const nir_shader *libagx, bool allow_mediump, diff --git a/src/asahi/compiler/agx_compiler.h b/src/asahi/compiler/agx_compiler.h index 06635fd9184..ad3a34f424a 100644 --- a/src/asahi/compiler/agx_compiler.h +++ b/src/asahi/compiler/agx_compiler.h @@ -925,7 +925,6 @@ void agx_emit_parallel_copies(agx_builder *b, struct agx_copy *copies, void agx_compute_liveness(agx_context *ctx); void agx_liveness_ins_update(BITSET_WORD *live, agx_instr *I); -bool agx_nir_lower_texture(nir_shader *s); bool agx_nir_opt_preamble(nir_shader *s, unsigned *preamble_size); bool agx_nir_lower_load_mask(nir_shader *shader); bool agx_nir_lower_address(nir_shader *shader); diff --git a/src/asahi/compiler/agx_nir_lower_texture.c b/src/asahi/compiler/agx_nir_lower_texture.c index e3f42e9f03d..604aeb1813c 100644 --- a/src/asahi/compiler/agx_nir_lower_texture.c +++ b/src/asahi/compiler/agx_nir_lower_texture.c @@ -537,7 +537,7 @@ lower_images(nir_builder *b, nir_intrinsic_instr *intr, UNUSED void *data) * descriptor bindings. That means these passes operate on texture derefs. The * purpose is to make descriptor crawls explicit in the NIR, so that the driver * can accurately lower descriptors after this pass but before calling - * agx_preprocess_nir (and hence the full agx_nir_lower_texture). + * the full agx_nir_lower_texture. */ bool agx_nir_lower_texture_early(nir_shader *s, bool support_lod_bias) diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 5e9399d30ce..124ac42eaed 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -2184,6 +2184,7 @@ agx_shader_initialize(struct agx_device *dev, struct agx_uncompiled_shader *so, NIR_PASS(_, nir, nir_lower_fragcolor, 8); } + NIR_PASS(_, nir, agx_nir_lower_texture); NIR_PASS(_, nir, nir_lower_ssbo); bool allow_mediump = !(dev->debug & AGX_DBG_NO16);