gallivm: fix loops and conditionals within GS
authorZack Rusin <zackr@vmware.com>
Tue, 9 Apr 2013 12:01:54 +0000 (05:01 -0700)
committerZack Rusin <zackr@vmware.com>
Wed, 10 Apr 2013 19:33:59 +0000 (12:33 -0700)
commitd56f2d52675397610717875c4a2a5edb04e2c997
treeb18c21d14710c07924f7ceebf9a35aba10dd638c
parentc1cd19c3b8339a48024e381515806186b8056256
gallivm: fix loops and conditionals within GS

We were using simple temporaries, without using alloca or phi
nodes which meant that on every iteration of the loop our
temporaries, which were holding the number of vertices and
primitives which were emitted, were being reset to zero. Now
we're using alloca to allocate those variables to preserve
them across conditionals.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c