OSDN Git Service

glsl: enable the new linear scan register allocator code
authorBrian Paul <brianp@vmware.com>
Tue, 7 Apr 2009 17:10:27 +0000 (11:10 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 7 Apr 2009 17:10:27 +0000 (11:10 -0600)
Seems to b working well enough to enable all the time.
Optimizations can be disabled with "export MESA_GLSL=nopt" if needed.

src/mesa/shader/prog_optimize.c

index 458a69f..5f35dbf 100644 (file)
@@ -803,11 +803,11 @@ _mesa_optimize_program(GLcontext *ctx, struct gl_program *program)
    if (1)
       _mesa_remove_dead_code(program);
 
-   if (0) /* not test much yet */
+   if (0) /* not tested much yet */
       _mesa_remove_extra_moves(program);
 
-   if (1)
+   if (0)
       _mesa_consolidate_registers(program);
-   else /*NEW*/
+   else
       _mesa_reallocate_registers(program);
 }