microsoft/spirv_to_dxil: vectorize IOs

DXIL doesn't like when 2 different variables occupy the same slot, so
let's vectorize IOs to avoid that.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16221>
This commit is contained in:
Boris Brezillon 2022-06-08 00:39:23 -07:00 committed by Marge Bot
parent 45f8b2ee50
commit a4fa63a103

View file

@ -668,6 +668,12 @@ dxil_spirv_nir_passes(nir_shader *nir,
{
glsl_type_singleton_init_or_ref();
NIR_PASS_V(nir, nir_lower_io_to_vector,
nir_var_shader_out |
(nir->info.stage != MESA_SHADER_VERTEX ? nir_var_shader_in : 0));
NIR_PASS_V(nir, nir_opt_combine_stores, nir_var_shader_out);
NIR_PASS_V(nir, nir_remove_dead_derefs);
const struct nir_lower_sysvals_to_varyings_options sysvals_to_varyings = {
.frag_coord = true,
.point_coord = true,