diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 9e1f2f06d54..289d795f812 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -1370,14 +1370,6 @@ agx_compile_variant(struct agx_device *dev, struct agx_uncompiled_shader *so, nir_shader *nir = nir_shader_clone(NULL, so->nir); - if (nir->info.stage == MESA_SHADER_FRAGMENT) { - struct asahi_fs_shader_key *key = &key_->fs; - - if (key->clip_plane_enable) { - NIR_PASS_V(nir, nir_lower_clip_fs, key->clip_plane_enable, false); - } - } - agx_preprocess_nir(nir); if (nir->info.stage == MESA_SHADER_VERTEX) { @@ -1412,6 +1404,10 @@ agx_compile_variant(struct agx_device *dev, struct agx_uncompiled_shader *so, key->sprite_coord_enable, false /* point coord is sysval */); } + + if (key->clip_plane_enable) { + NIR_PASS_V(nir, nir_lower_clip_fs, key->clip_plane_enable, false); + } } struct agx_shader_key base_key = {0};