aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-03-04 14:39:40 -0600
committerJason Ekstrand <[email protected]>2019-03-06 17:24:57 +0000
commit0a6b1d058076923fb98d44ac1d2b1bc314635800 (patch)
tree3548caa8f6731fa4d24da4d9c9728119cd4fbb4c
parent82d9a37a59c94ba3678b33acb9f2749cbbd7bfcc (diff)
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 <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/compiler/glsl/glsl_to_nir.cpp5
1 files changed, 5 insertions, 0 deletions
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;
}