glsl: only match gl_FragData and not gl_SecondaryFragDataEXT
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 21 Jun 2016 20:16:17 +0000 (16:16 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Wed, 22 Jun 2016 01:58:34 +0000 (21:58 -0400)
commit36ed1b695e5a0ae5714b79cae3a089b5e7e8bd29
tree7131e5df020ca78ff1bf1d51eb3167a13df3187a
parent1f4bca798dda155ad0615ba81d8373c771d1ec94
glsl: only match gl_FragData and not gl_SecondaryFragDataEXT

There's special logic around finding gl_FragData. It latches onto any
array with FRAG_RESULT_DATA0. However gl_SecondaryFragDataEXT[], added
by GL_EXT_blend_func_extended, fits those parameters as well. The real
frag data array should have index 0 though, so we can use that to
distinguish them.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96617
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.1 11.2 12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/glsl/opt_dead_builtin_varyings.cpp