r300/compiler: remove at least unused immediates if externals cannot be removed
[mesa.git] / src / mesa / drivers / dri / r300 / compiler / r3xx_fragprog.c
index 3716deaa7e7b9a3430f7507cdf75503ccd343105..e0d349b98ce147b33c17cd3b61b5857a6785b99d 100644 (file)
@@ -81,7 +81,6 @@ static void rc_rewrite_depth_out(struct radeon_compiler *cc, void *user)
 void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
 {
        int is_r500 = c->Base.is_r500;
-       int kill_consts = c->Base.remove_unused_constants;
        int opt = !c->Base.disable_optimizations;
 
        /* Lists of instruction transformations. */
@@ -121,7 +120,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
                {"emulate loops",               1, !is_r500,    rc_emulate_loops,               NULL},
                {"dataflow optimize",           1, opt,         rc_optimize,                    NULL},
                {"dataflow swizzles",           1, 1,           rc_dataflow_swizzles,           NULL},
-               {"dead constants",              1, kill_consts, rc_remove_unused_constants,     &c->code->constants_remap_table},
+               {"dead constants",              1, 1,           rc_remove_unused_constants,     &c->code->constants_remap_table},
                /* This pass makes it easier for the scheduler to group TEX
                 * instructions and reduces the chances of creating too
                 * many texture indirections.*/