panfrost: Lower texcoords late

Use the _late version of this lowering instead of the early one.

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:54:42 -05:00 committed by Marge Bot
parent 21ad75d4b9
commit b722410544

View file

@ -99,11 +99,6 @@ panfrost_shader_compile(struct panfrost_screen *screen, const nir_shader *ir,
if (s->info.outputs_written & BITFIELD_BIT(FRAG_RESULT_COLOR)) {
NIR_PASS_V(s, nir_lower_fragcolor, key->fs.nr_cbufs_for_fragcolor);
}
if (key->fs.sprite_coord_enable) {
NIR_PASS_V(s, nir_lower_texcoord_replace, key->fs.sprite_coord_enable,
true /* point coord is sysval */, false /* Y-invert */);
}
} else if (s->info.stage == MESA_SHADER_VERTEX) {
inputs.fixed_varying_mask = fixed_varying_mask;
@ -115,6 +110,12 @@ panfrost_shader_compile(struct panfrost_screen *screen, const nir_shader *ir,
pan_shader_preprocess(s, inputs.gpu_id);
if (s->info.stage == MESA_SHADER_FRAGMENT) {
if (key->fs.sprite_coord_enable) {
NIR_PASS_V(s, nir_lower_texcoord_replace_late,
key->fs.sprite_coord_enable,
true /* point coord is sysval */);
}
if (key->fs.clip_plane_enable) {
NIR_PASS_V(s, nir_lower_clip_fs, key->fs.clip_plane_enable, false);
}