[Mesa-dev] [PATCH v3 0/8] Implement support for EXT_blend_func_extended

Ryan Houdek sonicadvance1 at gmail.com
Thu Nov 12 10:02:21 PST 2015


In response to using FRAG_RESULT_DATA0 for both of the builtins that the
extension provides for ES2.
When looking at what _mesa_BindFragDataLocationIndexed does, it binds the
output variable to DATA0+colorNumber that you passed in to it, and also
sets that variable to being whatever index you passed in as well.
Also looking at the rest of the source that references COLOR and DATA, it
seems that in only ever expects one COLOR output, or as many DATA outputs
as there can be.
Also then that user defined outputs are bound to DATA rather than COLOR.
So I think that using DATA for this is the proper way to go even though the
builtin name wouldn't match. The alternative would be teaching the rest of
mesa and the other drivers to expect multiple COLOR outputs with different
indexes, all for the sake of matching an enum to a builtin variable name.

On Thu, Nov 5, 2015 at 9:00 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:

> On Thu, Nov 5, 2015 at 9:47 PM, Ryan Houdek <sonicadvance1 at gmail.com>
> wrote:
> > This implements support for a very new extension to ES, which allows you
> > to do dual source blending just like in desktop OpenGL.
> > This works with the piglits that I am writing that just need to be
> cleaned
> > before they are pushed, and it also works fantastically with the
> > Dolphin emulator (Only known application that uses this extension)
>
> Well this series looks good to me... perhaps someone can glance at how
> the outputs are defined for ES2... both use FRAG_RESULT_DATA0, which
> is a little questionable. I'm pretty weak on all the details there.
> But it's only for ESSL 1.0, where the other output will be
> FRAG_RESULT_COLOR. Probably OK?
>
> Ryan, piglits would be nice. In the meanwhile, this series is
>
> Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
>
> >
> > Ryan Houdek (8):
> >   Add EXT_blend_func_extended XML definitions
> >   Add required variables to _mesa_glsl_parse_state for
> >     EXT_blend_func_extended
> >   Add support for the new builtins that EXT_blend_func_extended
> >     provides.
> >   Add a parse check to check for the index layout qualifier
> >   Enable usage of blend_func_extended blend factors
> >   Allow MAX_DUAL_SOURCE_DRAW_BUFFERS to be available to ES
> >   Add EXT_blend_func_extended functions to the dispatch_sanity test
> >   Enable EXT_blend_func_extended if the driver supports the ARB version
> >
> >  src/glsl/ast_to_hir.cpp                 | 16 +++++++++
> >  src/glsl/builtin_variables.cpp          | 62
> +++++++++++++++++++++++++++++++++
> >  src/glsl/glsl_parser.yy                 |  5 +++
> >  src/glsl/glsl_parser_extras.cpp         |  3 ++
> >  src/glsl/glsl_parser_extras.h           |  5 +++
> >  src/mapi/glapi/gen/EXT_gpu_shader4.xml  |  3 +-
> >  src/mapi/glapi/gen/es_EXT.xml           | 38 ++++++++++++++++++++
> >  src/mesa/main/blend.c                   |  4 +--
> >  src/mesa/main/extensions.c              |  1 +
> >  src/mesa/main/get_hash_params.py        |  4 ++-
> >  src/mesa/main/tests/dispatch_sanity.cpp |  8 +++++
> >  11 files changed, 145 insertions(+), 4 deletions(-)
> >
> > --
> > 2.5.0
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151112/67d1b816/attachment.html>


More information about the mesa-dev mailing list