state_tracker: Fix assertion failures in conditional block movs.
authorEric Anholt <eric@anholt.net>
Fri, 12 Dec 2014 19:35:28 +0000 (11:35 -0800)
committerEric Anholt <eric@anholt.net>
Sat, 10 Jan 2015 00:54:12 +0000 (13:54 +1300)
commit24d94874323ef59ebc83c806497c3d826ae37b9e
treefea5b96061810de8607c167f58cc3ad9393be2b1
parent3d8188d4f898afcf4f181de29e12c5b218bbd393
state_tracker: Fix assertion failures in conditional block movs.

If you had a conditional assignment of an array or struct (say, from the
if-lowering pass), we'd try doing swizzle_for_size() on the aggregate
type, and it would assertion fail due to vector_elements==0.  Instead,
extend emit_block_mov() to handle emitting the conditional operations,
which also means we'll have appropriate writemasks/swizzles on the CMPs
within a struct containing various-sized members.

Fixes 20 testcases in es3conform on vc4.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp