With how we generate assignments, the trivial copy propagation in it
is really important, and some drivers will really want the register
allocation, too.
extern "C" {
#include "main/mtypes.h"
#include "shader/prog_instruction.h"
+#include "shader/prog_optimize.h"
#include "shader/prog_print.h"
#include "shader/program.h"
#include "shader/prog_uniform.h"
_mesa_reference_program(ctx, &shader->Program, prog);
+ if ((ctx->Shader.Flags & GLSL_NO_OPT) == 0) {
+ _mesa_optimize_program(ctx, prog);
+ }
+
return prog;
}