diff options
author | Ian Romanick <[email protected]> | 2016-07-08 17:39:48 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2016-08-17 10:52:39 +0100 |
commit | cd8764737e8b0caedc8500ad0829ebff6d2a3a8f (patch) | |
tree | baf6ff30044f3f2139140b7830c14d30971dcd4f /src/compiler/glsl/ir_validate.cpp | |
parent | 437e612bd7c0aadebf3d1dc959de090266ebab67 (diff) |
glsl: Don't support integer types for operations that can't handle them
ir_unop_fract already forbade integer types in ir_validate. ir_unop_rcp,
ir_unop_rsq, and ir_unop_sqrt should also forbid them in ir_validate.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir_validate.cpp')
-rw-r--r-- | src/compiler/glsl/ir_validate.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/glsl/ir_validate.cpp b/src/compiler/glsl/ir_validate.cpp index 3ded2029906..7e294f9f4db 100644 --- a/src/compiler/glsl/ir_validate.cpp +++ b/src/compiler/glsl/ir_validate.cpp @@ -260,6 +260,8 @@ ir_validate::visit_leave(ir_expression *ir) case ir_unop_rcp: case ir_unop_rsq: case ir_unop_sqrt: + assert(ir->type->base_type == GLSL_TYPE_FLOAT || + ir->type->base_type == GLSL_TYPE_DOUBLE); assert(ir->type == ir->operands[0]->type); break; |