From ca08e745257f76443f593ea0e91f2dd1a13b2556 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Tue, 6 Apr 2021 10:47:34 -0700 Subject: [PATCH] microsoft/spirv_to_dxil: Support doubles First, we need to lower alu to scalar so that all alu ops on doubles only take one input. Then, we can use our new double lowering pass. Reviewed-by: Enrico Galli Reviewed-by: Michael Tang Part-of: --- src/microsoft/spirv_to_dxil/spirv_to_dxil.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/microsoft/spirv_to_dxil/spirv_to_dxil.c b/src/microsoft/spirv_to_dxil/spirv_to_dxil.c index faf8bacf2aa..01a9d867471 100644 --- a/src/microsoft/spirv_to_dxil/spirv_to_dxil.c +++ b/src/microsoft/spirv_to_dxil/spirv_to_dxil.c @@ -87,6 +87,10 @@ spirv_to_dxil(const uint32_t *words, size_t word_count, NIR_PASS_V(nir, nir_lower_var_copies); NIR_PASS_V(nir, nir_lower_io_arrays_to_elements_no_indirects, false); + NIR_PASS_V(nir, nir_lower_alu_to_scalar, NULL, NULL); + NIR_PASS_V(nir, nir_opt_dce); + NIR_PASS_V(nir, dxil_nir_lower_double_math); + { bool progress; do