st/nine: Rewrite LOOP implementation, and a0 aL handling
authorAxel Davy <axel.davy@ens.fr>
Mon, 8 Dec 2014 14:38:28 +0000 (15:38 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 22 Jan 2015 22:16:21 +0000 (22:16 +0000)
commit6a8e5e48be0bad4606b2d5d7ba736a3d2a277c55
treeee3e79a1d9486b983be7278c8a5049143238701d
parentc9aa9a0addee01201d28a7bed10f7e320af591a1
st/nine: Rewrite LOOP implementation, and a0 aL handling

Previous implementation didn't work well with nested loops.

Instead of using several address registers, put a0 and aL
into normal registers, and copy them to one address register when
we need to use them.

Wine tests loop_index_test() and nested_loop_test() now pass correctly.

Fixes r600g crash while loading Bioshock -
bug https://bugs.freedesktop.org/show_bug.cgi?id=85696

Tested-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Tiziano Bacocco <tizbac2@gmail.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Cc: "10.4" <mesa-stable@lists.freedesktop.org>
src/gallium/state_trackers/nine/nine_shader.c