st/mesa: move VS & TES output stores to the end before unlowering IO

required by vc4 & vc5

Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33053>
This commit is contained in:
Marek Olšák 2025-01-16 02:02:45 -05:00 committed by Marge Bot
parent b65973240c
commit 3290222a1a

View file

@ -863,6 +863,12 @@ st_create_common_variant(struct st_context *st,
* are still counted as enabled IO, which breaks things.
*/
NIR_PASS(_, state.ir.nir, nir_opt_dce);
/* vc4, vc5 require this. */
if (state.ir.nir->info.stage == MESA_SHADER_VERTEX ||
state.ir.nir->info.stage == MESA_SHADER_TESS_EVAL)
NIR_PASS(_, state.ir.nir, nir_move_output_stores_to_end);
NIR_PASS(_, state.ir.nir, st_nir_unlower_io_to_vars);
if (state.ir.nir->info.stage == MESA_SHADER_TESS_CTRL &&