[Mesa-dev] [PATCH 4/6] Bitwise conversion operator support in ir_validate.
Olivier Galibert
galibert at pobox.com
Mon Apr 30 04:19:04 PDT 2012
Signed-off-by: Olivier Galibert <galibert at pobox.com>
---
src/glsl/ir_validate.cpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index 7efb434..98a702a 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_bi2f:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT);
+ assert(ir->type->base_type == GLSL_TYPE_FLOAT);
+ break;
+ case ir_unop_bf2i:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
+ assert(ir->type->base_type == GLSL_TYPE_INT);
+ break;
+ case ir_unop_bu2f:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT);
+ assert(ir->type->base_type == GLSL_TYPE_FLOAT);
+ break;
+ case ir_unop_bf2u:
+ 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);
--
1.7.10.rc3.1.gb306
More information about the mesa-dev
mailing list