OSDN Git Service

glsl: Fix ir validation for bit logic ops
authorChad Versace <chad@chad-versace.us>
Wed, 13 Oct 2010 15:29:58 +0000 (08:29 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 15 Oct 2010 07:20:18 +0000 (00:20 -0700)
commite2c1fe3eb0fa47f5501b4ec8cd6b732db7ca84be
tree9cee253665d9fb2d495391cb2444e3d3ab981467
parent4761d0d22ba79fa34adf679007498287e9fedca2
glsl: Fix ir validation for bit logic ops

In ir_validate::visit_leave(), the cases for
    - ir_binop_bit_and
    - ir_binop_bit_xor
    - ir_binop_bit_or
were incorrect. It was incorrectly asserted that both operands must be the
same type, when in fact one may be scalar and the other a vector. It was also
incorrectly asserted that the resultant type was the type of the left operand,
which in fact does not hold when the left operand is a scalar and the right
operand is a vector.
src/glsl/ir_validate.cpp