[Mesa-dev] [PATCH v2 2/6] glapi: add GL_OES_geometry_shader extension

Lofstedt, Marta marta.lofstedt at intel.com
Tue Jan 12 06:08:21 PST 2016



> -----Original Message-----
> From: mesa-dev [mailto:mesa-dev-bounces at lists.freedesktop.org] On
> Behalf Of Ian Romanick
> Sent: Monday, November 30, 2015 8:38 PM
> To: Ilia Mirkin; Marta Lofstedt
> Cc: mesa-dev at lists.freedesktop.org
> Subject: Re: [Mesa-dev] [PATCH v2 2/6] glapi: add
> GL_OES_geometry_shader extension
> 
> On 11/27/2015 09:58 AM, Ilia Mirkin wrote:
> > On Fri, Nov 27, 2015 at 9:31 AM, Marta Lofstedt
> > <marta.lofstedt at linux.intel.com> wrote:
> >> From: Marta Lofstedt <marta.lofstedt at intel.com>
> >>
> >> Add xml definitions for the GL_OES_geometry_shader extension and
> >> expose the extension for OpenGL ES 3.1.
> >>
> >> Signed-off-by: Marta Lofstedt <marta.lofstedt at linux.intel.com>
> >> ---
> >>  src/mapi/glapi/gen/apiexec.py           |  2 +-
> >>  src/mapi/glapi/gen/es_EXT.xml           | 43
> +++++++++++++++++++++++++++++++++
> >>  src/mesa/main/extensions_table.h        |  1 +
> >>  src/mesa/main/mtypes.h                  |  1 +
> >>  src/mesa/main/tests/dispatch_sanity.cpp |  3 +++
> >>  5 files changed, 49 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/src/mapi/glapi/gen/apiexec.py
> >> b/src/mapi/glapi/gen/apiexec.py index 58ec08b..fa046fa 100644
> >> --- a/src/mapi/glapi/gen/apiexec.py
> >> +++ b/src/mapi/glapi/gen/apiexec.py
> >> @@ -72,7 +72,7 @@ functions = {
> >>
> >>      # OpenGL 3.2 / GL_ARB_geometry_shader4.  Mesa does not support
> >>      # GL_ARB_geometry_shader4, so OpenGL 3.2 is required.
> >> -    "FramebufferTexture": exec_info(core=32),
> >> +    "FramebufferTexture": exec_info(core=32, es2=31),
> >>
> >>      # OpenGL 4.0 / GL_ARB_shader_subroutines. Mesa only exposes this
> >>      # extension with core profile.
> >> diff --git a/src/mapi/glapi/gen/es_EXT.xml
> >> b/src/mapi/glapi/gen/es_EXT.xml index 577d825..f6c49c2 100644
> >> --- a/src/mapi/glapi/gen/es_EXT.xml
> >> +++ b/src/mapi/glapi/gen/es_EXT.xml
> >> @@ -940,4 +940,47 @@
> >>      </function>
> >>
> >>  </category>
> >> +
> >> +<!-- 175. GL_OES_geometry_shader --> <category
> >> +name="GL_OES_geometry_shader" number="175">
> >> +    <enum name="GEOMETRY_SHADER_OES"
> value="0x8DD9"/>
> >> +    <enum name="GEOMETRY_SHADER_BIT_OES"
> value="0x00000004"/>
> >> +    <enum name="GEOMETRY_LINKED_VERTICES_OUT_OES"
> value="0x8916"/>
> >> +    <enum name="GEOMETRY_LINKED_INPUT_TYPE_OES"
> value="0x8917"/>
> >> +    <enum name="GEOMETRY_LINKED_OUTPUT_TYPE_OES"
> value="0x8918"/>
> >> +    <enum name="GEOMETRY_SHADER_INVOCATIONS_OES"
> value="0x887F"/>
> >> +    <enum name="LAYER_PROVOKING_VERTEX_OES"
> value="0x825E"/>
> >> +    <enum name="MAX_GEOMETRY_UNIFORM_BLOCKS_OES"
> value="0x8A2C"/>
> >> +    <enum
> name="MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_OES"
> value="0x8A32"/>
> >> +    <enum name="MAX_GEOMETRY_INPUT_COMPONENTS_OES"
> value="0x9123"/>
> >> +    <enum name="MAX_GEOMETRY_OUTPUT_COMPONENTS_OES"
> value="0x9124"/>
> >> +    <enum name="MAX_GEOMETRY_OUTPUT_VERTICES_OES"
> value="0x8DE0"/>
> >> +    <enum
> name="MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_OES"
> value="0x8DE1"/>
> >> +    <enum name="MAX_GEOMETRY_SHADER_INVOCATIONS_OES"
> value="0x8E5A"/>
> >> +    <enum name="MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_OES"
> value="0x8C29"/>
> >> +    <enum name="MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_OES"
> value="0x92CF"/>
> >> +    <enum name="MAX_GEOMETRY_ATOMIC_COUNTERS_OES"
> value="0x92D5"/>
> >> +    <enum name="MAX_GEOMETRY_IMAGE_UNIFORMS_OES"
> value="0x90CD"/>
> >> +    <enum name="MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_OES"
> value="0x90D7"/>
> >> +    <enum name="FIRST_VERTEX_CONVENTION_OES"
> value="0x8E4D"/>
> >> +    <enum name="LAST_VERTEX_CONVENTION_OES"
> value="0x8E4E"/>
> >> +    <enum name="UNDEFINED_VERTEX_OES"
> value="0x8260"/>
> >> +    <enum name="PRIMITIVES_GENERATED_OES"
> value="0x8C87"/>
> >> +    <enum name="LINES_ADJACENCY_OES"                             value="0xA"/>
> >> +    <enum name="LINE_STRIP_ADJACENCY_OES"
> value="0xB"/>
> >> +    <enum name="TRIANGLES_ADJACENCY_OES"
> value="0xC"/>
> >> +    <enum name="TRIANGLE_STRIP_ADJACENCY_OES"
> value="0xD"/>
> >> +    <enum name="FRAMEBUFFER_DEFAULT_LAYERS_OES"
> value="0x9312"/>
> >> +    <enum name="MAX_FRAMEBUFFER_LAYERS_OES"
> value="0x9317"/>
> >> +    <enum name="FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_OES"
> value="0x8DA8"/>
> >> +    <enum name="FRAMEBUFFER_ATTACHMENT_LAYERED_OES"
> value="0x8DA7"/>
> >> +    <enum name="REFERENCED_BY_GEOMETRY_SHADER_OES"
> value="0x9309"/>
> >> +
> >> +    <function name="FramebufferTextureOES"
> alias="FramebufferTexture" es2="3.1">
> >> +        <param name="target" type="GLenum"/>
> >> +        <param name="attachment" type="GLenum"/>
> >> +        <param name="texture" type="GLuint"/>
> >> +        <param name="level" type="GLint"/>
> >> +    </function>
> >> +  </category>
> >>  </OpenGLAPI>
> >> diff --git a/src/mesa/main/extensions_table.h
> >> b/src/mesa/main/extensions_table.h
> >> index 051d69a..d3cbb25 100644
> >> --- a/src/mesa/main/extensions_table.h
> >> +++ b/src/mesa/main/extensions_table.h
> >> @@ -307,6 +307,7 @@ EXT(OES_element_index_uint                  ,
> dummy_true
> >>  EXT(OES_fbo_render_mipmap                   , dummy_true                             ,  x ,
> x , ES1, ES2, 2005)
> >>  EXT(OES_fixed_point                         , dummy_true                             ,  x ,  x ,
> ES1,  x , 2002)
> >>  EXT(OES_framebuffer_object                  , dummy_true                             ,  x ,  x
> , ES1,  x , 2005)
> >> +EXT(OES_geometry_shader                     , dummy_true                             ,  x ,
> x ,  x ,  31, 2015)
> >
> > This should surely depend on OES_geometry_shader, not dummy_true...
> 
Actually, I believe it should be a dependency to OES_shader_io_blocks.
I will send up a V3.

> I was going to make the same comment.  I was also going to pose the
> question: do we expect that every Mesa implementer of GLES3.1 will also
> support GL_OES_geometry_shader out-of-the-box?  If that's the case, then
> we can use dummy_true and gl_extensions::OES_geometry_shader (below)
> should be removed.
> 
> > Not a huge fan of adding the extra entry to gl_extensions, but I don't
> > see a great way around it. It'll all be hidden behind
> > _mesa_has_geometry_shaders anyways, so it shouldn't be too bad.
> >
> >>  EXT(OES_get_program_binary                  , dummy_true                             ,  x ,
> x ,  x , ES2, 2008)
> >>  EXT(OES_mapbuffer                           , dummy_true                             ,  x ,  x ,
> ES1, ES2, 2005)
> >>  EXT(OES_packed_depth_stencil                , dummy_true                             ,  x ,
> x , ES1, ES2, 2007)
> >> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index
> >> c1b18a4..bff355e 100644
> >> --- a/src/mesa/main/mtypes.h
> >> +++ b/src/mesa/main/mtypes.h
> >> @@ -3818,6 +3818,7 @@ struct gl_extensions
> >>     GLboolean OES_texture_half_float;
> >>     GLboolean OES_texture_half_float_linear;
> >>     GLboolean OES_compressed_ETC1_RGB8_texture;
> >> +   GLboolean OES_geometry_shader;
> >>     GLboolean extension_sentinel;
> >>     /** The extension string */
> >>     const GLubyte *String;
> >> diff --git a/src/mesa/main/tests/dispatch_sanity.cpp
> >> b/src/mesa/main/tests/dispatch_sanity.cpp
> >> index 97f81f9..b5b8c8b 100644
> >> --- a/src/mesa/main/tests/dispatch_sanity.cpp
> >> +++ b/src/mesa/main/tests/dispatch_sanity.cpp
> >> @@ -2517,5 +2517,8 @@ const struct function
> gles31_functions_possible[] = {
> >>     /* GL_EXT_blend_func_extended */
> >>     { "glGetProgramResourceLocationIndexEXT", 31, -1 },
> >>
> >> +   /*GL_OES_geometry_shader*/
> >
> > Spaces please.
> >
> > With the above 2 fixed, this is
> >
> > Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
> >
> >> +   { "glFramebufferTextureOES", 31, -1},
> >> +
> >>     { NULL, 0, -1 },
> >>   };
> >> --
> >> 2.5.0
> >>
> >> _______________________________________________
> >> mesa-dev mailing list
> >> mesa-dev at lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list