glsl/nir: Call nir_lower_constant_initializers
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 15 Jul 2016 23:57:06 +0000 (16:57 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 5 Dec 2016 23:40:09 +0000 (15:40 -0800)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/compiler/glsl/glsl_to_nir.cpp

index 0b74b7e5aa3c1eb1b980dce45dcbf6cb87009455..f60139c2f2a882816bfd66a47825367707e9fddb 100644 (file)
@@ -144,6 +144,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);