summaryrefslogtreecommitdiffstats
path: root/src/glsl/lower_instructions.cpp
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2014-08-14 18:44:50 +1000
committerIlia Mirkin <[email protected]>2015-02-19 00:28:35 -0500
commit8be5ee23de774a1101b808ff081cc3316d358933 (patch)
treec8631e36a54c2b892d5d499d8b1346c4430a563d /src/glsl/lower_instructions.cpp
parent3bbaf719940447045b4f1faae77953e15908cfec (diff)
glsl: enable/disable certain lowering passes for doubles
We want to restrict some lowering passes to floats only, and enable other for doubles. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/glsl/lower_instructions.cpp')
-rw-r--r--src/glsl/lower_instructions.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/lower_instructions.cpp b/src/glsl/lower_instructions.cpp
index 09afe556454..5c1d6aae8fb 100644
--- a/src/glsl/lower_instructions.cpp
+++ b/src/glsl/lower_instructions.cpp
@@ -306,7 +306,7 @@ lower_instructions_visitor::mod_to_floor(ir_expression *ir)
/* Don't generate new IR that would need to be lowered in an additional
* pass.
*/
- if (lowering(DIV_TO_MUL_RCP))
+ if (lowering(DIV_TO_MUL_RCP) && ir->type->is_float())
div_to_mul_rcp(div_expr);
ir_expression *const floor_expr =
@@ -548,7 +548,7 @@ lower_instructions_visitor::visit_leave(ir_expression *ir)
break;
case ir_binop_mod:
- if (lowering(MOD_TO_FLOOR) && ir->type->is_float())
+ if (lowering(MOD_TO_FLOOR) && (ir->type->is_float() || ir->type->is_double()))
mod_to_floor(ir);
break;
@@ -563,7 +563,7 @@ lower_instructions_visitor::visit_leave(ir_expression *ir)
break;
case ir_binop_ldexp:
- if (lowering(LDEXP_TO_ARITH))
+ if (lowering(LDEXP_TO_ARITH) && ir->type->is_float())
ldexp_to_arith(ir);
break;