ir_to_mesa: Don't forget to run the Mesa IR optimization passes.
With how we generate assignments, the trivial copy propagation in it is really important, and some drivers will really want the register allocation, too.
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
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"
|
||||
@@ -1675,6 +1676,10 @@ get_mesa_program(GLcontext *ctx, void *mem_ctx, struct gl_shader *shader)
|
||||
|
||||
_mesa_reference_program(ctx, &shader->Program, prog);
|
||||
|
||||
if ((ctx->Shader.Flags & GLSL_NO_OPT) == 0) {
|
||||
_mesa_optimize_program(ctx, prog);
|
||||
}
|
||||
|
||||
return prog;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user