From: Kenneth Graunke Date: Fri, 19 Nov 2010 01:15:13 +0000 (-0800) Subject: glsl: Simplify a type check by using type->is_integer(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b943fb94bf50f20b773dc63558feb6b9480b8a28;p=mesa.git glsl: Simplify a type check by using type->is_integer(). --- diff --git a/src/glsl/lower_div_to_mul_rcp.cpp b/src/glsl/lower_div_to_mul_rcp.cpp index d34c4bc46d7..db9d6854cda 100644 --- a/src/glsl/lower_div_to_mul_rcp.cpp +++ b/src/glsl/lower_div_to_mul_rcp.cpp @@ -62,8 +62,7 @@ ir_div_to_mul_rcp_visitor::visit_leave(ir_expression *ir) if (ir->operation != ir_binop_div) return visit_continue; - if (ir->operands[1]->type->base_type != GLSL_TYPE_INT && - ir->operands[1]->type->base_type != GLSL_TYPE_UINT) { + if (!ir->operands[1]->type->is_integer()) { /* New expression for the 1.0 / op1 */ ir_rvalue *expr; expr = new(ir) ir_expression(ir_unop_rcp,