glsl: Refine the loop instruction counting.
authorEric Anholt <eric@anholt.net>
Tue, 21 Feb 2012 21:37:49 +0000 (13:37 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 8 Mar 2012 19:19:12 +0000 (11:19 -0800)
commitbe5f27a84d0d4efb57071d9d7ecda061223d03ef
treefbdebe4525b0fa6829a77ad91c0d03dd3c49b356
parent7f1cbf12bc883090734983bdd98e5158b9a194a0
glsl: Refine the loop instruction counting.

Before, we were only counting top-level instructions.  But if we have
an assignment of a giant expression tree (such as the ones eventually
generated by glsl-fs-unroll), we were counting the same as an
assignment of a variable deref.

glsl-fs-unroll-explosion now fails in a reasonable amount of time on
i965 because the unrolling didn't go ridiculously far.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/loop_unroll.cpp