Mesa (master): glsl/nir: Inline functions in float64_funcs_to_nir

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Mar 6 17:25:14 UTC 2019


Module: Mesa
Branch: master
Commit: 0a6b1d058076923fb98d44ac1d2b1bc314635800
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a6b1d058076923fb98d44ac1d2b1bc314635800

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Mon Mar  4 14:39:40 2019 -0600

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 <mattst88 at gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/compiler/glsl/glsl_to_nir.cpp | 5 +++++
 1 file changed, 5 insertions(+)

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;
 }




More information about the mesa-commit mailing list