aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program/ir_to_mesa.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-01 08:06:37 +0200
committermarha <marha@users.sourceforge.net>2011-09-01 08:06:37 +0200
commit746359d2f7e675a0bfc48a4ba6f8200cace98df2 (patch)
treebe9e3cd02e43b69c70432036c3c6f90c11a4be7f /mesalib/src/mesa/program/ir_to_mesa.cpp
parentd14fe6598b87092374b1be6eb655153d270c3066 (diff)
downloadvcxsrv-746359d2f7e675a0bfc48a4ba6f8200cace98df2.tar.gz
vcxsrv-746359d2f7e675a0bfc48a4ba6f8200cace98df2.tar.bz2
vcxsrv-746359d2f7e675a0bfc48a4ba6f8200cace98df2.zip
mesa git update 1 Sep 2011
Diffstat (limited to 'mesalib/src/mesa/program/ir_to_mesa.cpp')
-rw-r--r--mesalib/src/mesa/program/ir_to_mesa.cpp10
1 files changed, 5 insertions, 5 deletions
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;