OSDN Git Service

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)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 24 Jun 2016 19:25:10 +0000 (20:25 +0100)
commitabfed13bf40fd5bc49626d6f7a17790aa32b57bd
tree1b90b3274dcd111fc0bd8a66451da62510616cf4
parent8ac0a713f7486c1306e2671edf2cbb6531881676
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>
(cherry picked from commit 36ed1b695e5a0ae5714b79cae3a089b5e7e8bd29)
src/compiler/glsl/opt_dead_builtin_varyings.cpp