diff options
author | Boris Brezillon <boris.brezillon@collabora.com> | 2022-06-08 00:39:23 -0700 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-06-08 15:17:05 +0000 |
commit | a4fa63a103fd8c5b936389d0ee52046f3d1b2dfe (patch) | |
tree | 7a0b6268a750f1c1260f5ea249bc03ccdc7d9de3 | |
parent | 45f8b2ee50b457f74a95600e3b2a82ce35f3333e (diff) |
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>
-rw-r--r-- | src/microsoft/spirv_to_dxil/dxil_spirv_nir.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/microsoft/spirv_to_dxil/dxil_spirv_nir.c b/src/microsoft/spirv_to_dxil/dxil_spirv_nir.c index 80add533768..072719551e9 100644 --- a/src/microsoft/spirv_to_dxil/dxil_spirv_nir.c +++ b/src/microsoft/spirv_to_dxil/dxil_spirv_nir.c @@ -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, |