mesa: set the gl_FragDepth layout in the GLSL linker
[mesa.git] / src / mesa / program / prog_optimize.c
index 3340ce0498b7967ae00087c862e25632be06c23f..25d9684b1374d9d4f45d223611f45b451e16f183 100644 (file)
@@ -1358,6 +1358,8 @@ _mesa_optimize_program(struct gl_context *ctx, struct gl_program *program)
          any_change = GL_TRUE;
       if (_mesa_remove_dead_code_local(program))
          any_change = GL_TRUE;
+
+      any_change = _mesa_constant_fold(program) || any_change;
       _mesa_reallocate_registers(program);
    } while (any_change);
 }