From 746359d2f7e675a0bfc48a4ba6f8200cace98df2 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 1 Sep 2011 08:06:37 +0200 Subject: mesa git update 1 Sep 2011 --- mesalib/src/mesa/program/ir_to_mesa.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mesalib/src/mesa/program') diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp index 6820e4c6b..9813c4ae8 100644 --- a/mesalib/src/mesa/program/ir_to_mesa.cpp +++ b/mesalib/src/mesa/program/ir_to_mesa.cpp @@ -3119,7 +3119,7 @@ get_mesa_program(struct gl_context *ctx, switch (mesa_inst->Opcode) { case OPCODE_IF: - if (options->EmitNoIfs) { + if (options->MaxIfDepth == 0) { linker_warning(shader_program, "Couldn't flatten if-statement. " "This will likely result in software " @@ -3232,7 +3232,7 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) /* Lowering */ do_mat_op_to_vec(ir); lower_instructions(ir, (MOD_TO_FRACT | DIV_TO_MUL_RCP | EXP_TO_EXP2 - | LOG_TO_LOG2 + | LOG_TO_LOG2 | INT_DIV_TO_MUL_RCP | ((options->EmitNoPow) ? POW_TO_EXP2 : 0))); progress = do_lower_jumps(ir, true, true, options->EmitNoMainReturn, options->EmitNoCont, options->EmitNoLoops) || progress; @@ -3241,10 +3241,10 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) progress = lower_quadop_vector(ir, true) || progress; - if (options->EmitNoIfs) { + if (options->MaxIfDepth == 0) progress = lower_discard(ir) || progress; - progress = lower_if_to_cond_assign(ir) || progress; - } + + progress = lower_if_to_cond_assign(ir, options->MaxIfDepth) || progress; if (options->EmitNoNoise) progress = lower_noise(ir) || progress; -- cgit v1.2.3