glapi: add GL_OES_geometry_shader extension
authorMarta Lofstedt <marta.lofstedt@intel.com>
Thu, 21 Jan 2016 15:17:29 +0000 (16:17 +0100)
committerMarta Lofstedt <marta.lofstedt@linux.intel.com>
Fri, 22 Jan 2016 16:13:55 +0000 (17:13 +0100)
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@linux.intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mapi/glapi/gen/apiexec.py
src/mapi/glapi/gen/es_EXT.xml
src/mesa/main/extensions_table.h
src/mesa/main/mtypes.h
src/mesa/main/tests/dispatch_sanity.cpp

index 58ec08be4664d58afe6befa63074eed2b52b1471..2a8043264eb264b10554ec2f0caaf7b8d8403343 100644 (file)
@@ -70,9 +70,8 @@ functions = {
     # extension with core profile.
     "TexBuffer": exec_info(core=31),
 
-    # 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),
+    # OpenGL 3.2 / GL_OES_geometry_shader.
+    "FramebufferTexture": exec_info(core=32, es2=31),
 
     # OpenGL 4.0 / GL_ARB_shader_subroutines. Mesa only exposes this
     # extension with core profile.
index 577d8254c43867b0bc283c21a50f5acdb8b29a42..86df980304bec013ec5af5962976ea797569b035 100644 (file)
     </function>
 
 </category>
+
+<!-- 175. GL_OES_geometry_shader -->
+<category name="GL_OES_geometry_shader" number="210">
+    <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>
index 9cec1762dbe7f6c3f62ca9d347c6dd6dfedcb655..11f4482f8d25a755bf96073da763e82732fd2cb3 100644 (file)
@@ -311,6 +311,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                     , OES_geometry_shader                    ,  x ,  x ,  x ,  31, 2015)
 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)
index 3912c2bc847f5269b1b67c2a063b343664aa1261..15dd1ca7cdf1c3dca069c1bbdbc26454245bccdf 100644 (file)
@@ -3905,6 +3905,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;
index eb1108124e96776867191f44939b008d94629658..e64129622513e1c0354bfb334b4760f2426a9bc7 100644 (file)
@@ -2527,5 +2527,8 @@ const struct function gles31_functions_possible[] = {
    /* GL_EXT_blend_func_extended */
    { "glGetProgramResourceLocationIndexEXT", 31, -1 },
 
+   /* GL_OES_geometry_shader */
+   { "glFramebufferTextureOES", 31, -1},
+
    { NULL, 0, -1 },
  };