pco: handle frag/point coords sysvals

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998>
This commit is contained in:
Simon Perretta 2024-12-03 15:03:27 +00:00 committed by Marge Bot
parent 74d50d7720
commit 9d23d92afa

View file

@ -85,6 +85,16 @@ void pco_preprocess_nir(pco_ctx *ctx, nir_shader *nir)
nir_split_array_vars,
nir_var_function_temp | nir_var_shader_temp);
if (nir->info.stage == MESA_SHADER_FRAGMENT) {
const struct nir_lower_sysvals_to_varyings_options sysvals_to_varyings = {
.frag_coord = true,
.point_coord = true,
};
NIR_PASS(_, nir, nir_lower_sysvals_to_varyings, &sysvals_to_varyings);
}
NIR_PASS(_, nir, nir_lower_system_values);
NIR_PASS(_,
nir,
nir_lower_io_vars_to_temporaries,