From: Matt Turner Date: Fri, 6 Sep 2013 22:05:10 +0000 (-0700) Subject: glsl: Correctly validate fma()'s types. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a3b51a22f71819236baa6bbda9d0d050914b149d;p=mesa.git glsl: Correctly validate fma()'s types. lrp() can take a scalar as a third argument, and fma() cannot. Reviewed-by: Kenneth Graunke --- diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index 66a9800ce75..2068de06a3b 100644 --- a/src/glsl/ir_validate.cpp +++ b/src/glsl/ir_validate.cpp @@ -531,6 +531,12 @@ ir_validate::visit_leave(ir_expression *ir) break; case ir_triop_fma: + assert(ir->type->base_type == GLSL_TYPE_FLOAT); + assert(ir->type == ir->operands[0]->type); + assert(ir->type == ir->operands[1]->type); + assert(ir->type == ir->operands[2]->type); + break; + case ir_triop_lrp: assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT); assert(ir->operands[0]->type == ir->operands[1]->type);