glsl: Fix incorrect optimization of instructions before discard statements.
authorEric Anholt <eric@anholt.net>
Wed, 8 Jun 2011 18:25:04 +0000 (11:25 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 10 Jun 2011 20:17:01 +0000 (13:17 -0700)
commit20f087863d00fed9823791a447932e74d77cc546
treee6399cae5832651458d1c0a3ddd7a6bfce7b05e1
parent23ef4a6063668c187d00a0502207f0c03be5f994
glsl: Fix incorrect optimization of instructions before discard statements.

The function was named "find_unconditional_discard", but didn't
actually check that the discard statement found was unconditional.
Fixes piglit glsl-fs-discard-04.

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