microsoft/spirv_to_dxil: Add extra lowering functions according to the docs on nir_inline_functions

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9846>
This commit is contained in:
Michael Tang 2021-03-23 14:42:03 -07:00 committed by Marge Bot
parent 2f3dc0264c
commit cb5120bcf7

View file

@ -53,8 +53,17 @@ spirv_to_dxil(const uint32_t *words, size_t word_count,
"Validate before feeding NIR to the DXIL compiler");
NIR_PASS_V(nir, nir_split_per_member_structs);
nir_variable_mode nir_var_function_temp =
nir_var_shader_in | nir_var_shader_out;
NIR_PASS_V(nir, nir_lower_variable_initializers,
nir_var_function_temp);
NIR_PASS_V(nir, nir_opt_deref);
NIR_PASS_V(nir, nir_lower_returns);
NIR_PASS_V(nir, nir_inline_functions);
// todo remove all non-entrypoint functions
NIR_PASS_V(nir, nir_lower_variable_initializers,
~nir_var_function_temp);
struct nir_to_dxil_options opts = {0};