st/mesa: unlower IO for internal shaders if needed

This will be required because all internal shaders will be converted
to IO intrinsics.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
This commit is contained in:
Marek Olšák 2024-12-24 14:09:17 -05:00 committed by Marge Bot
parent 7e39045733
commit 135c9fa7b6

View file

@ -73,6 +73,12 @@ st_nir_finish_builtin_nir(struct st_context *st, nir_shader *nir)
if (!screen->get_param(screen, PIPE_CAP_NIR_IMAGES_AS_DEREF))
NIR_PASS(_, nir, gl_nir_lower_images, false);
if (nir->info.io_lowered &&
!(nir->options->io_options & nir_io_has_intrinsics)) {
NIR_PASS(_, nir, st_nir_unlower_io_to_vars);
gl_nir_opts(nir);
}
if (screen->finalize_nir) {
char *msg = screen->finalize_nir(screen, nir);
free(msg);