Mesa (master): glsl2: Allow ir_constant::zero to create boolean constants

Ian Romanick idr at kemper.freedesktop.org
Wed Sep 1 17:30:49 UTC 2010


Module: Mesa
Branch: master
Commit: a4262874f84e25412cb9bc53b3f1771e4017e27c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a4262874f84e25412cb9bc53b3f1771e4017e27c

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Wed Sep  1 10:12:55 2010 -0700

glsl2: Allow ir_constant::zero to create boolean constants

---

 src/glsl/ir.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index 992853c..5bd023f 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -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;




More information about the mesa-commit mailing list