glsl2: Allow ir_constant::zero to create boolean constants
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 1 Sep 2010 17:12:55 +0000 (10:12 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 1 Sep 2010 17:25:11 +0000 (10:25 -0700)
src/glsl/ir.cpp

index 992853c0466a9583f3dc3b4fc5df21470f3362ba..5bd023f499e47e97a1f72200ed7089741e12d8d1 100644 (file)
@@ -454,7 +454,7 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
 ir_constant *
 ir_constant::zero(void *mem_ctx, const glsl_type *type)
 {
-   assert(type->is_numeric());
+   assert(type->is_numeric() || type->is_boolean());
 
    ir_constant *c = new(mem_ctx) ir_constant;
    c->type = type;