gallivm: Fix assignment of unsigned values to OUT register.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 22 Apr 2013 14:28:32 +0000 (15:28 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 22 Apr 2013 17:23:42 +0000 (18:23 +0100)
commitc0538860bf656a1796b4a5c9c136c7d3517dfba6
treef973e33ca878733b77283463c5981e6792c5210c
parentec646e465493ffc12caeccad01a9333f82e85517
gallivm: Fix assignment of unsigned values to OUT register.

TEMP is not the only register file that accept unsigned. OUT too.

Actually, what determines the appropriate type of the destination value is
not the opcode, but rather the register.

Also cleanup/simplify code.  Add a few more asserts, but also make
code more robust by handling graceful if assert fails.

This fixes segfault / assertion in the included vert-uadd.sh graw shader.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
src/gallium/tests/graw/vertex-shader/vert-uadd.sh [new file with mode: 0755]