summaryrefslogtreecommitdiff
path: root/src/mesa/program
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-11-24 22:21:10 -0800
committerIan Romanick <ian.d.romanick@intel.com>2010-12-01 12:01:13 -0800
commitc4285be9a5bd1adaa89050989374b95a9a601cdc (patch)
tree588f3788a24029512cdda1efe5f5831634243bbd /src/mesa/program
parentda61afa7388f1ce50ef612b89aba2302a052a3bb (diff)
glsl: Lower ir_binop_pow to a sequence of EXP2 and LOG2
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index d9d86b6c29..b274a961b2 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2849,8 +2849,9 @@ _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);
+ lower_instructions(ir, (MOD_TO_FRACT | DIV_TO_MUL_RCP | EXP_TO_EXP2
+ | LOG_TO_LOG2
+ | ((options->EmitNoPow) ? POW_TO_EXP2 : 0)));
progress = do_lower_jumps(ir, true, true, options->EmitNoMainReturn, options->EmitNoCont, options->EmitNoLoops) || progress;