diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2014-04-06 22:45:43 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2014-04-08 00:02:01 -0700 |
commit | 40d9337406709d0e5e143c51dc5d57921a91aab9 (patch) | |
tree | ef1fe12a04e6f42d0c6066539b6463ad8a901567 /src/glsl/ir_validate.cpp | |
parent | e14b93371cc8394bd69622f6b60cfdf8ba177360 (diff) | |
download | external_mesa3d-40d9337406709d0e5e143c51dc5d57921a91aab9.zip external_mesa3d-40d9337406709d0e5e143c51dc5d57921a91aab9.tar.gz external_mesa3d-40d9337406709d0e5e143c51dc5d57921a91aab9.tar.bz2 |
glsl: Validate that base types match for a number of binops.
The IR is not supposed to support implicit type conversions; we just
failed to validate it.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/glsl/ir_validate.cpp')
-rw-r--r-- | src/glsl/ir_validate.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index 527acea..71defc8 100644 --- a/src/glsl/ir_validate.cpp +++ b/src/glsl/ir_validate.cpp @@ -381,6 +381,9 @@ ir_validate::visit_leave(ir_expression *ir) case ir_binop_min: case ir_binop_max: case ir_binop_pow: + assert(ir->operands[0]->type->base_type == + ir->operands[1]->type->base_type); + if (ir->operands[0]->type->is_scalar()) assert(ir->operands[1]->type == ir->type); else if (ir->operands[1]->type->is_scalar()) |