diff options
Diffstat (limited to 'src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c index e9fb49e7c1..3e8a8236c0 100644 --- a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c +++ b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c @@ -991,6 +991,7 @@ void r3xx_compile_vertex_program(struct r300_vertex_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. */ struct radeon_program_transformation alu_rewrite_r500[] = { @@ -1029,12 +1030,12 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler *c) {"native rewrite", 1, is_r500, rc_local_transform, alu_rewrite_r500}, {"native rewrite", 1, !is_r500, rc_local_transform, alu_rewrite_r300}, {"emulate modifiers", 1, !is_r500, rc_local_transform, emulate_modifiers}, - {"deadcode", 1, 1, rc_dataflow_deadcode, dataflow_outputs_mark_used}, - {"dataflow optimize", 1, 1, rc_optimize, NULL}, + {"deadcode", 1, opt, rc_dataflow_deadcode, dataflow_outputs_mark_used}, + {"dataflow optimize", 1, opt, rc_optimize, NULL}, /* This pass must be done after optimizations. */ {"source conflict resolve", 1, 1, rc_local_transform, resolve_src_conflicts}, {"dataflow swizzles", 1, 1, rc_dataflow_swizzles, NULL}, - {"register allocation", 1, 1, allocate_temporary_registers, NULL}, + {"register allocation", 1, opt, allocate_temporary_registers, NULL}, {"dead constants", 1, kill_consts, rc_remove_unused_constants, &c->code->constants_remap_table}, {"final code validation", 0, 1, rc_validate_final_shader, NULL}, {"machine code generation", 0, 1, translate_vertex_program, NULL}, |