glsl_to_tgsi: execute merge_registers() after eliminate_dead_code()
authorEmil Velikov <emil.l.velikov@gmail.com>
Tue, 21 Jun 2011 20:52:19 +0000 (21:52 +0100)
committerBryan Cain <bryancain3@gmail.com>
Mon, 1 Aug 2011 22:59:08 +0000 (17:59 -0500)
Fixes a regression unintentionally introduced by "glsl_to_tgsi: fix shaders with
indirect addressing of temps" that caused missing leaves in 3dmark01 test 4 (Nature)
and missing/displaced textures on human models in Counter-Strike: Source.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Bryan Cain <bryancain3@gmail.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 322bfbbf1abee7985a5657a07fcf858839812088..abeb44a408380a66c891085b1e1802143e65c86a 100644 (file)
@@ -4274,8 +4274,8 @@ get_mesa_program(struct gl_context *ctx,
     */
    if (!v->indirect_addr_temps) {
       v->copy_propagate();
-      v->merge_registers();
       v->eliminate_dead_code();
+      v->merge_registers();
       v->renumber_registers();
    }