glsl: Fix structure and array comparisions.
authorEric Anholt <eric@anholt.net>
Tue, 30 Nov 2010 19:23:28 +0000 (11:23 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 30 Nov 2010 19:42:42 +0000 (11:42 -0800)
commitff79633d9f930e396933a0ad9564824ec73ea4dc
treedfb739086ec04a08b8c4fedcb9dd12a666951bfc
parent6b937465d4aeab72fabcfe5250d477cf6790a521
glsl: Fix structure and array comparisions.

We were trying to emit a single ir_expression to compare the whole
thing.  The backends (ir_to_mesa.cpp and brw_fs.cpp so far) expected
ir_binop_any_nequal or ir_binop_all_equal to apply to at most a vector
(with matrices broken down by the lowering pass).  Break them down to
a bunch of ORed or ANDed any_nequals/all_equals.

Fixes:
glsl-array-compare
glsl-array-compare-02
glsl-fs-struct-equal
glsl-fs-struct-notequal
Bug #31909
src/glsl/ast_to_hir.cpp