[Mesa-dev] [PATCH] i965: Add a driconf option to disable GL_ARB_blend_func_extended.

Eric Anholt eric at anholt.net
Wed Jul 18 10:04:00 PDT 2012


Kenneth Graunke <kenneth at whitecape.org> writes:

> Unigine Heaven (at least) has a bug where it incorrectly uses the
> GL_ARB_blend_func_extended extension.
>
> Dual source blending allows two color outputs per render target;
> individual shader outputs can be assigned to be either the first or
> second blending input by setting the 'index' via one of two methods:
>
> - An API call: glBindFragDataLocationIndexed()
> - The GLSL 'layout' qualifier provided by GL_ARB_explicit_attrib_location
>
> Both of these only work on user defined fragment shader outputs; it's an
> error to use either on built-in outputs like gl_FragData.
>
> Unigine uses gl_FragData and gl_FragColor exclusively, and doesn't even
> attempt to use either method to set index == 1.  However, it does set
> the blending function to SRC1 enums, which requires a fragment shader
> output with index == 1 or else rendering is undefined.
>
> In other words, enabling ARB_blend_func_extended causes Unigine to
> render incorrectly, resulting in an apparent regression, even though our
> driver code (as far as I can tell) is perfectly fine.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50291
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/dri/common/drirc             |  4 ++++
>  src/mesa/drivers/dri/common/xmlpool/options.h | 10 ++++++++++
>  src/mesa/drivers/dri/intel/intel_extensions.c |  2 +-
>  src/mesa/drivers/dri/intel/intel_screen.c     |  3 ++-
>  4 files changed, 17 insertions(+), 2 deletions(-)
>
> Really sad to send this out, but I'm not sure what else to do.  I thought
> I found an small bit of out-of-spec behavior that they were relying on
> which could make things work, but it doesn't...even with my change, the
> sun disappears from the sky.
>
> Still need to report this upstream.

Yeah, hopefully some day later when we get a higher GL version, we can
remove this workaround.

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120718/93850ab1/attachment.pgp>


More information about the mesa-dev mailing list