From b943fb94bf50f20b773dc63558feb6b9480b8a28 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 18 Nov 2010 17:15:13 -0800 Subject: [PATCH] glsl: Simplify a type check by using type->is_integer(). --- src/glsl/lower_div_to_mul_rcp.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/glsl/lower_div_to_mul_rcp.cpp b/src/glsl/lower_div_to_mul_rcp.cpp index d34c4bc..db9d685 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, -- 2.7.4