Mesa (master): ir_validate: Ensure ir_binop_dot is only used on vector types.

Kenneth Graunke kwg at kemper.freedesktop.org
Wed Sep 8 19:11:49 UTC 2010


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Sep  7 23:22:10 2010 -0700

ir_validate: Ensure ir_binop_dot is only used on vector types.

---

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

diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index 8e82590..445169f 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -338,6 +338,7 @@ ir_validate::visit_leave(ir_expression *ir)
    case ir_binop_dot:
       assert(ir->type == glsl_type::float_type);
       assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
+      assert(ir->operands[0]->type->is_vector());
       assert(ir->operands[0]->type == ir->operands[1]->type);
       break;
 




More information about the mesa-commit mailing list