Using GL_EXT_blend_func_extended works with gl_FragColor / gl_SecondaryFragColorEXT but not with gl_FragData / gl_SecondaryFragDataEXT
This was found when trying to use the 3.3 core profile in Chromium.
See https://github.com/Kangz/GLDriverBugs/blob/master/gl_secondary_frag_data/Main.cpp#L24 for a repro case (no blue triangle shows up).
This fixes a hacked up piglit test for me, but need to do more testing before pushing.
Thanks for taking a look at this so quickly!
I pushed a slightly improved version of the patch:
Author: Ilia Mirkin <email@example.com>
Date: Tue Jun 21 16:16:17 2016 -0400
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
Signed-off-by: Ilia Mirkin <firstname.lastname@example.org>
Cc: "11.1 11.2 12.0" <email@example.com>
Reviewed-by: Kenneth Graunke <firstname.lastname@example.org>
on Mar 24, 2017 at 12:09:06.
(provided by the Example extension).