summaryrefslogtreecommitdiff
path: root/src/glsl/ir_validate.cpp
diff options
context:
space:
mode:
authorOlivier Galibert <galibert@pobox.com>2012-05-08 20:40:34 +0200
committerKenneth Graunke <kenneth@whitecape.org>2012-06-07 00:06:18 -0700
commit1b8a3aad09d67e72903fdcc79beadfc3c77cae62 (patch)
treea4e413b9c6fc666743253c6349096a4021589a56 /src/glsl/ir_validate.cpp
parent4fab1505594acf0cc02a53d01ce20c8b17e3e913 (diff)
glsl: Bitwise conversion operator support in ir_validate.
Signed-off-by: Olivier Galibert <galibert@pobox.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/glsl/ir_validate.cpp')
-rw-r--r--src/glsl/ir_validate.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index 7efb4347799..5721717a5ac 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -288,6 +288,22 @@ ir_validate::visit_leave(ir_expression *ir)
assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT);
assert(ir->type->base_type == GLSL_TYPE_INT);
break;
+ case ir_unop_bitcast_i2f:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT);
+ assert(ir->type->base_type == GLSL_TYPE_FLOAT);
+ break;
+ case ir_unop_bitcast_f2i:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
+ assert(ir->type->base_type == GLSL_TYPE_INT);
+ break;
+ case ir_unop_bitcast_u2f:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT);
+ assert(ir->type->base_type == GLSL_TYPE_FLOAT);
+ break;
+ case ir_unop_bitcast_f2u:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
+ assert(ir->type->base_type == GLSL_TYPE_UINT);
+ break;
case ir_unop_any:
assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL);