[Mesa-dev] [PATCH v3 1/8] glapi: Add EXT_blend_func_extended XML definitions

Ian Romanick idr at freedesktop.org
Tue Nov 10 14:01:28 PST 2015


Okay... I see what happened.  I thought it was weird that it added
glBindFragDataLocationEXT to an ES3 context because GLES3 surely already
has glBindFragDataLocation.  It actually doesn't.  The only way to set
the fragment shader output location is using a layout qualifier in the
shader.  GLES generally has a "one way to do things" guiding principle,
so glBindFragDataLocation had to go.  Nice to see NVIDIA sneak it back
in with a mostly unrelated extension. :)

This patch is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 11/06/2015 10:41 AM, Ryan Houdek wrote:
> Yes this is correct. These functions are only available in ES 3.0+ profiles.
> The only things that ES 2.0 gets is the new builtins for the shading
> language.
> 
> On Fri, Nov 6, 2015 at 12:49 PM, Ian Romanick <idr at freedesktop.org
> <mailto:idr at freedesktop.org>> wrote:
> 
>     On 11/05/2015 06:47 PM, Ryan Houdek wrote:
>     > ---
>     >  src/mapi/glapi/gen/EXT_gpu_shader4.xml  |  3 ++-
>     >  src/mapi/glapi/gen/es_EXT.xml           | 26 ++++++++++++++++++++++++++
>     >  src/mesa/main/tests/dispatch_sanity.cpp |  8 ++++++++
>     >  3 files changed, 36 insertions(+), 1 deletion(-)
>     >
>     > diff --git a/src/mapi/glapi/gen/EXT_gpu_shader4.xml b/src/mapi/glapi/gen/EXT_gpu_shader4.xml
>     > index b1f7eae..b4120b9 100644
>     > --- a/src/mapi/glapi/gen/EXT_gpu_shader4.xml
>     > +++ b/src/mapi/glapi/gen/EXT_gpu_shader4.xml
>     > @@ -232,7 +232,8 @@
>     >          <param name="params" type="GLuint *"/>
>     >      </function>
>     >
>     > -    <function name="BindFragDataLocationEXT" alias="BindFragDataLocation">
>     > +    <function name="BindFragDataLocationEXT" alias="BindFragDataLocation"
>     > +         es2="3.0">
> 
>     Is this right?  It looks like patch 8 enables the extension in OpenGL ES
>     2.0 contexts.
> 
>     There are more occurrences of this below...
> 
>     >          <param name="program" type="GLuint"/>
>     >          <param name="colorNumber" type="GLuint"/>
>     >          <param name="name" type="const GLchar *"/>
>     > diff --git a/src/mapi/glapi/gen/es_EXT.xml
>     b/src/mapi/glapi/gen/es_EXT.xml
>     > index 9a777a2..577d825 100644
>     > --- a/src/mapi/glapi/gen/es_EXT.xml
>     > +++ b/src/mapi/glapi/gen/es_EXT.xml
>     > @@ -914,4 +914,30 @@
>     >      </function>
>     >  </category>
>     >
>     > +<category name="GL_EXT_blend_func_extended" number="247">
>     > +
>     > +    <function name="BindFragDataLocationIndexedEXT"
>     alias="BindFragDataLocationIndexed"
>     > +            es2="3.0">
>     > +        <param name="program" type="GLuint"/>
>     > +        <param name="colorNumber" type="GLuint"/>
>     > +        <param name="index" type="GLuint"/>
>     > +        <param name="name" type="const GLchar *"/>
>     > +    </function>
>     > +
>     > +    <function name="GetFragDataIndexEXT" alias="GetFragDataIndex"
>     > +            es2="3.0">
>     > +        <param name="program" type="GLuint"/>
>     > +        <param name="name" type="const GLchar *"/>
>     > +        <return type="GLint"/>
>     > +    </function>
>     > +
>     > +    <function name="GetProgramResourceLocationIndexEXT"
>     alias="GetProgramResourceLocationIndex"
>     > +           es2="3.1">
>     > +        <param name="program" type="GLuint"/>
>     > +        <param name="programInterface" type="GLenum"/>
>     > +        <param name="name" type="const GLchar *"/>
>     > +        <return type="GLint"/>
>     > +    </function>
>     > +
>     > +</category>
>     >  </OpenGLAPI>
>     > diff --git a/src/mesa/main/tests/dispatch_sanity.cpp
>     b/src/mesa/main/tests/dispatch_sanity.cpp
>     > index abe0f43..97f81f9 100644
>     > --- a/src/mesa/main/tests/dispatch_sanity.cpp
>     > +++ b/src/mesa/main/tests/dispatch_sanity.cpp
>     > @@ -2421,6 +2421,11 @@ const struct function
>     gles3_functions_possible[] = {
>     >     { "glProgramUniform4uiEXT", 30, -1 },
>     >     { "glProgramUniform4uivEXT", 30, -1 },
>     >
>     > +   /* GL_EXT_blend_func_extended */
>     > +   { "glBindFragDataLocationIndexedEXT", 30, -1 },
>     > +   { "glGetFragDataIndexEXT", 30, -1 },
>     > +   { "glBindFragDataLocationEXT", 30, -1 },
>     > +
>     >     { NULL, 0, -1 }
>     >  };
>     >
>     > @@ -2509,5 +2514,8 @@ const struct function
>     gles31_functions_possible[] = {
>     >     /* GL_EXT_buffer_storage */
>     >     { "glBufferStorageEXT", 31, -1 },
>     >
>     > +   /* GL_EXT_blend_func_extended */
>     > +   { "glGetProgramResourceLocationIndexEXT", 31, -1 },
>     > +
>     >     { NULL, 0, -1 },
>     >   };
>     >
> 
> 



More information about the mesa-dev mailing list