From: Jason Ekstrand Date: Mon, 4 Mar 2019 20:39:40 +0000 (-0600) Subject: glsl/nir: Inline functions in float64_funcs_to_nir X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0a6b1d058076923fb98d44ac1d2b1bc314635800;p=mesa.git glsl/nir: Inline functions in float64_funcs_to_nir This doesn't really change anything as the functions will all get inlined anyway. However it does let us do a bit of the work earlier and in a common place. Reviewed-by: Matt Turner Reviewed-by: Jordan Justen Reviewed-by: Kenneth Graunke --- diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 950885a1e00..062434d066b 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -2363,5 +2363,10 @@ glsl_float64_funcs_to_nir(struct gl_context *ctx, nir_validate_shader(nir, "float64_funcs_to_nir"); + NIR_PASS_V(nir, nir_lower_constant_initializers, nir_var_function_temp); + NIR_PASS_V(nir, nir_lower_returns); + NIR_PASS_V(nir, nir_inline_functions); + NIR_PASS_V(nir, nir_opt_deref); + return nir; }