[Mesa-dev] [PATCH 3/8] glsl/nir: Call nir_lower_constant_initializers

Jason Ekstrand jason at jlekstrand.net
Wed Jul 20 22:28:24 UTC 2016


Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
---
 src/compiler/glsl/glsl_to_nir.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index 20302e3..e6171d9 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -143,6 +143,8 @@ glsl_to_nir(const struct gl_shader_program *shader_prog,
    v2.run(sh->ir);
    visit_exec_list(sh->ir, &v1);
 
+   nir_lower_constant_initializers(shader, (nir_variable_mode)~0);
+
    shader->info.name = ralloc_asprintf(shader, "GLSL%d", shader_prog->Name);
    if (shader_prog->Label)
       shader->info.label = ralloc_strdup(shader, shader_prog->Label);
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list