microsoft/compiler: Lower I/O to scalar
authorJesse Natalie <jenatali@microsoft.com>
Sun, 17 Jul 2022 12:07:34 +0000 (05:07 -0700)
committerMarge Bot <emma+marge@anholt.net>
Sat, 23 Jul 2022 14:48:17 +0000 (14:48 +0000)
A future change will start computing component masks while
processing I/O instructions, and only having to compute
a mask for one component per instruction simplifies things.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

src/microsoft/compiler/nir_to_dxil.c

index 10f733e..1055807 100644 (file)
@@ -5757,6 +5757,7 @@ nir_to_dxil(struct nir_shader *s, const struct nir_to_dxil_options *opts,
    NIR_PASS_V(s, dxil_nir_ensure_position_writes);
    NIR_PASS_V(s, nir_lower_pack);
    NIR_PASS_V(s, dxil_nir_lower_system_values);
+   NIR_PASS_V(s, nir_lower_io_to_scalar, nir_var_shader_in | nir_var_system_value | nir_var_shader_out);
 
    if (ctx->mod.shader_kind == DXIL_HULL_SHADER)
       NIR_PASS_V(s, dxil_nir_split_tess_ctrl, &ctx->tess_ctrl_patch_constant_func);