panfrost: Lower clip_fs late

This pass works both early and late, so this is an easy one to sink down.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906>
This commit is contained in:
Alyssa Rosenzweig 2023-02-06 23:53:35 -05:00 committed by Marge Bot
parent 2745daa05a
commit 21ad75d4b9

View file

@ -104,10 +104,6 @@ panfrost_shader_compile(struct panfrost_screen *screen, const nir_shader *ir,
NIR_PASS_V(s, nir_lower_texcoord_replace, key->fs.sprite_coord_enable,
true /* point coord is sysval */, false /* Y-invert */);
}
if (key->fs.clip_plane_enable) {
NIR_PASS_V(s, nir_lower_clip_fs, key->fs.clip_plane_enable, false);
}
} else if (s->info.stage == MESA_SHADER_VERTEX) {
inputs.fixed_varying_mask = fixed_varying_mask;
@ -118,6 +114,12 @@ panfrost_shader_compile(struct panfrost_screen *screen, const nir_shader *ir,
util_dynarray_init(&out->binary, NULL);
pan_shader_preprocess(s, inputs.gpu_id);
if (s->info.stage == MESA_SHADER_FRAGMENT) {
if (key->fs.clip_plane_enable) {
NIR_PASS_V(s, nir_lower_clip_fs, key->fs.clip_plane_enable, false);
}
}
if (dev->arch <= 5 && s->info.stage == MESA_SHADER_FRAGMENT) {
NIR_PASS_V(s, pan_lower_framebuffer, key->fs.rt_formats,
pan_raw_format_mask_midgard(key->fs.rt_formats), 0,