glsl: fix optimization of discard nested multiple levels
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 26 Jul 2016 08:04:57 +0000 (10:04 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 28 Jul 2016 09:47:04 +0000 (10:47 +0100)
commit21556d86fc74d91ab58a7496a876ad33e0f950df
treed98c25d0b24644cadac29b12a5aa819cc981ae59
parent185b0c15abfba8b011f5b009e9f1890305e40ff6
glsl: fix optimization of discard nested multiple levels

The order of optimizations can lead to the conditional discard optimization
being applied twice to the same discard statement. In this case, we must
ensure that both conditions are applied.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96762
Cc: mesa-stable@lists.freedesktop.org
Tested-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/glsl/opt_conditional_discard.cpp