st/mesa: fix nir_lower_io if it's done right after IO vectorization

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050>
This commit is contained in:
Marek Olšák 2021-02-08 06:06:24 -05:00 committed by Marge Bot
parent d7250b0b08
commit a0718e8977
1 changed files with 7 additions and 0 deletions

View File

@ -597,6 +597,13 @@ st_nir_vectorize_io(nir_shader *producer, nir_shader *consumer)
NIR_PASS_V(producer, nir_split_var_copies);
NIR_PASS_V(producer, nir_lower_var_copies);
}
/* Undef scalar store_deref intrinsics are not ignored by nir_lower_io,
* so they must be removed before that. These passes remove them.
*/
NIR_PASS_V(producer, nir_lower_vars_to_ssa);
NIR_PASS_V(producer, nir_opt_undef);
NIR_PASS_V(producer, nir_opt_dce);
}
static void