summaryrefslogtreecommitdiffstats
path: root/src/glsl/lower_instructions.cpp
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2013-11-27 14:23:50 -0800
committerMatt Turner <[email protected]>2013-12-04 20:05:42 -0800
commitd79e7117183e484f0f017f16bbf24b861ad5bcb7 (patch)
treefd7daad3db580ddf2b7b27ff142db61a908e7004 /src/glsl/lower_instructions.cpp
parentb1eb2ad8d159748034e7befc22b46a0b3b040186 (diff)
glsl: Remove silly OR(..., 0x0) from ldexp() lowering.
I translated copysign(0.0f, x) a little too literally. Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl/lower_instructions.cpp')
-rw-r--r--src/glsl/lower_instructions.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/glsl/lower_instructions.cpp b/src/glsl/lower_instructions.cpp
index d01879cbd4f..8f8d448ea65 100644
--- a/src/glsl/lower_instructions.cpp
+++ b/src/glsl/lower_instructions.cpp
@@ -383,7 +383,6 @@ lower_instructions_visitor::ldexp_to_arith(ir_expression *ir)
/* Constants */
ir_constant *zeroi = ir_constant::zero(ir, ivec);
- ir_constant *zerof = ir_constant::zero(ir, ir->type);
ir_constant *sign_mantissa_mask = new(ir) ir_constant(0x807fffffu, vec_elem);
ir_constant *sign_mask = new(ir) ir_constant(0x80000000u, vec_elem);
@@ -429,8 +428,7 @@ lower_instructions_visitor::ldexp_to_arith(ir_expression *ir)
*/
i.insert_before(zero_sign_x);
i.insert_before(assign(zero_sign_x,
- bitcast_u2f(bit_or(bit_and(bitcast_f2u(x), sign_mask),
- bitcast_f2u(zerof)))));
+ bitcast_u2f(bit_and(bitcast_f2u(x), sign_mask))));
i.insert_before(is_not_zero_or_underflow);
i.insert_before(assign(is_not_zero_or_underflow,