mesa: remove ARB_geometry_shader4
authorMarta Lofstedt <marta.lofstedt@intel.com>
Wed, 25 Nov 2015 11:16:02 +0000 (12:16 +0100)
committerMarta Lofstedt <marta.lofstedt@linux.intel.com>
Thu, 26 Nov 2015 07:40:46 +0000 (08:40 +0100)
No drivers currently implement ARB_geometry_shader4, nor are there
any plans to implement it.  We only support the version of geometry
shaders that was incorporated into OpenGL 3.2 / GLSL 1.50.

Signed-off-by: Marta Lofstedt <marta.lofstedt@linux.intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mapi/glapi/gen/ARB_geometry_shader4.xml [deleted file]
src/mapi/glapi/gen/Makefile.am
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/api_validate.c
src/mesa/main/config.h
src/mesa/main/context.h
src/mesa/main/dlist.c
src/mesa/main/get.c
src/mesa/main/get_hash_params.py
src/mesa/main/mtypes.h
src/mesa/main/tests/enum_strings.cpp

diff --git a/src/mapi/glapi/gen/ARB_geometry_shader4.xml b/src/mapi/glapi/gen/ARB_geometry_shader4.xml
deleted file mode 100644 (file)
index 280e7a0..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
-
-<!-- Note: no GLX protocol info yet. -->
-
-<OpenGLAPI>
-
-
-<category name="GL_ARB_geometry_shader4" number="47">
-    <enum name="GEOMETRY_SHADER_ARB"              value="0x8DD9"/>
-    <enum name="GEOMETRY_VERTICES_OUT_ARB"        value="0x8DDA"/>
-    <enum name="GEOMETRY_INPUT_TYPE_ARB"          value="0x8DDB"/>
-    <enum name="GEOMETRY_OUTPUT_TYPE_ARB"         value="0x8DDC"/>
-    <enum name="MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB"     value="0x8C29"/>
-    <enum name="MAX_GEOMETRY_VARYING_COMPONENTS_ARB"      value="0x8DDD"/>
-    <enum name="MAX_VERTEX_VARYING_COMPONENTS_ARB"        value="0x8DDE"/>
-    <enum name="MAX_VARYING_COMPONENTS"                   value="0x8B4B"/>
-    <enum name="MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB"      value="0x8DDF"/>
-    <enum name="MAX_GEOMETRY_OUTPUT_VERTICES_ARB"         value="0x8DE0"/>
-    <enum name="MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB" value="0x8DE1"/>
-    <enum name="LINES_ADJACENCY_ARB"          value="0xA"/>
-    <enum name="LINE_STRIP_ADJACENCY_ARB"     value="0xB"/>
-    <enum name="TRIANGLES_ADJACENCY_ARB"      value="0xC"/>
-    <enum name="TRIANGLE_STRIP_ADJACENCY_ARB" value="0xD"/>
-    <enum name="FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB" value="0x8DA8"/>
-    <enum name="FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB"   value="0x8DA9"/>
-    <enum name="FRAMEBUFFER_ATTACHMENT_LAYERED_ARB"   value="0x8DA7"/>
-    <enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER" value="0x8CD4"/>
-    <enum name="PROGRAM_POINT_SIZE_ARB" value="0x8642"/>
-    <function name="ProgramParameteriARB"  alias="ProgramParameteri">
-        <param name="program" type="GLuint"/>
-        <param name="pname" type="GLenum"/>
-        <param name="value" type="GLint"/>
-    </function>
-    <function name="FramebufferTextureARB"  alias="FramebufferTexture">
-        <param name="target" type="GLenum"/>
-        <param name="attachment" type="GLenum"/>
-        <param name="texture" type="GLuint"/>
-        <param name="level" type="GLint"/>
-    </function>
-    <function name="FramebufferTextureLayerARB" alias="FramebufferTextureLayer">
-        <param name="target" type="GLenum"/>
-        <param name="attachment" type="GLenum"/>
-        <param name="texture" type="GLuint"/>
-        <param name="level" type="GLint"/>
-        <param name="layer" type="GLint"/>
-    </function>
-    <function name="FramebufferTextureFaceARB" exec="skip">
-        <param name="target" type="GLenum"/>
-        <param name="attachment" type="GLenum"/>
-        <param name="texture" type="GLuint"/>
-        <param name="level" type="GLint"/>
-        <param name="face" type="GLenum"/>
-    </function>
-</category>
-
-</OpenGLAPI>
index a5a26a652ee438f02b8481b4978f253d03826c54..40b0e6599f4d9d43c06fcf6e0c92e196a55823cf 100644 (file)
@@ -133,7 +133,6 @@ API_XML = \
        ARB_ES3_compatibility.xml \
        ARB_framebuffer_no_attachments.xml \
        ARB_framebuffer_object.xml \
-       ARB_geometry_shader4.xml \
        ARB_get_program_binary.xml \
        ARB_get_texture_sub_image.xml \
        ARB_gpu_shader_fp64.xml \
index ec83cd43d168714a51f3866e43983a598a526714..6243bddd218a93b9e1b041136023a989f0e14b9b 100644 (file)
 
 <!-- 46. GL_ARB_framebuffer_sRGB -->
 
-<xi:include href="ARB_geometry_shader4.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<!-- 47. GL_ARB_geometry_shader4. There are no intentions to implement this extension -->
 
 <!-- 48. GL_ARB_half_float_vertex -->
 
index d0b3ae7342e15e8bb7808b1e73e91e7721afdbd9..d693ec64ce48e65081635e7b3ca74eb20ad84df1 100644 (file)
@@ -170,7 +170,7 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name)
       return GL_FALSE;
    }
 
-   /* From the ARB_geometry_shader4 spec:
+   /* From the OpenGL 4.5 specification, section 11.3.1:
     *
     * The error INVALID_OPERATION is generated if Begin, or any command that
     * implicitly calls Begin, is called when a geometry shader is active and:
index f29de5f91fdff8f071e1d8c8c2b228f1a4a9d589..2d53e2fa72f54f3ee7a8af79f3d601ab7351e426 100644 (file)
 #define MAX_FEEDBACK_BUFFERS 4
 #define MAX_FEEDBACK_ATTRIBS 32
 
-/** For GL_ARB_geometry_shader4 */
+/** For geometry shader */
 /*@{*/
 #define MAX_GEOMETRY_UNIFORM_COMPONENTS              512
 #define MAX_GEOMETRY_OUTPUT_VERTICES                 256
index 4798b1f9b43607a01ec0cd8004c16425a92f6ea1..8b64f452572774c679a167fb9e46f09280994734 100644 (file)
@@ -330,8 +330,7 @@ _mesa_is_gles31(const struct gl_context *ctx)
 static inline bool
 _mesa_has_geometry_shaders(const struct gl_context *ctx)
 {
-   return _mesa_is_desktop_gl(ctx) &&
-      (ctx->Version >= 32 || ctx->Extensions.ARB_geometry_shader4);
+   return _mesa_is_desktop_gl(ctx) && ctx->Version >= 32;
 }
 
 
index 2b65b2ea94933c007668201b7d33ed82e1c2dd83..ba2e670eb9ae19135d19e7bf3d1235b3c3a279a3 100644 (file)
@@ -457,11 +457,6 @@ typedef enum
    OPCODE_SAMPLER_PARAMETERIIV,
    OPCODE_SAMPLER_PARAMETERUIV,
 
-   /* GL_ARB_geometry_shader4 */
-   OPCODE_PROGRAM_PARAMETERI,
-   OPCODE_FRAMEBUFFER_TEXTURE,
-   OPCODE_FRAMEBUFFER_TEXTURE_FACE,
-
    /* GL_ARB_sync */
    OPCODE_WAIT_SYNC,
 
@@ -7554,44 +7549,6 @@ save_SamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *params)
    }
 }
 
-/* GL_ARB_geometry_shader4 */
-static void GLAPIENTRY
-save_ProgramParameteri(GLuint program, GLenum pname, GLint value)
-{
-   Node *n;
-   GET_CURRENT_CONTEXT(ctx);
-   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
-   n = alloc_instruction(ctx, OPCODE_PROGRAM_PARAMETERI, 3);
-   if (n) {
-      n[1].ui = program;
-      n[2].e = pname;
-      n[3].i = value;
-   }
-   if (ctx->ExecuteFlag) {
-      CALL_ProgramParameteri(ctx->Exec, (program, pname, value));
-   }
-}
-
-static void GLAPIENTRY
-save_FramebufferTexture(GLenum target, GLenum attachment,
-                        GLuint texture, GLint level)
-{
-   Node *n;
-   GET_CURRENT_CONTEXT(ctx);
-   ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
-   n = alloc_instruction(ctx, OPCODE_FRAMEBUFFER_TEXTURE, 4);
-   if (n) {
-      n[1].e = target;
-      n[2].e = attachment;
-      n[3].ui = texture;
-      n[4].i = level;
-   }
-   if (ctx->ExecuteFlag) {
-      CALL_FramebufferTexture(ctx->Exec, (target, attachment, texture, level));
-   }
-}
-
-
 static void GLAPIENTRY
 save_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
 {
@@ -8841,14 +8798,6 @@ execute_list(struct gl_context *ctx, GLuint list)
             }
             break;
 
-         /* GL_ARB_geometry_shader4 */
-         case OPCODE_PROGRAM_PARAMETERI:
-            CALL_ProgramParameteri(ctx->Exec, (n[1].ui, n[2].e, n[3].i));
-            break;
-         case OPCODE_FRAMEBUFFER_TEXTURE:
-            CALL_FramebufferTexture(ctx->Exec, (n[1].e, n[2].e,
-                                                   n[3].ui, n[4].i));
-            break;
          /* GL_ARB_sync */
          case OPCODE_WAIT_SYNC:
             {
@@ -9614,10 +9563,6 @@ _mesa_initialize_save_table(const struct gl_context *ctx)
    SET_BlendEquationiARB(table, save_BlendEquationi);
    SET_BlendEquationSeparateiARB(table, save_BlendEquationSeparatei);
 
-   /* OpenGL 3.2 */
-   SET_ProgramParameteri(table, save_ProgramParameteri);
-   SET_FramebufferTexture(table, save_FramebufferTexture);
-
    /* GL_NV_conditional_render */
    SET_BeginConditionalRender(table, save_BeginConditionalRender);
    SET_EndConditionalRender(table, save_EndConditionalRender);
index 539c41148dd395fe24c26b624da75720a54e6250..c6a2e5b912c12512f19a9dd518e2ad0b7ddd0d90 100644 (file)
@@ -398,7 +398,6 @@ EXTRA_EXT(EXT_pixel_buffer_object);
 EXTRA_EXT(ARB_vertex_program);
 EXTRA_EXT2(NV_point_sprite, ARB_point_sprite);
 EXTRA_EXT2(ARB_vertex_program, ARB_fragment_program);
-EXTRA_EXT(ARB_geometry_shader4);
 EXTRA_EXT(ARB_color_buffer_float);
 EXTRA_EXT(EXT_framebuffer_sRGB);
 EXTRA_EXT(OES_EGL_image_external);
@@ -455,12 +454,6 @@ static const int extra_gl32_es3[] = {
     EXTRA_END,
 };
 
-static const int extra_gl32_ARB_geometry_shader4[] = {
-    EXTRA_VERSION_32,
-    EXT(ARB_geometry_shader4),
-    EXTRA_END
-};
-
 static const int extra_gl40_ARB_sample_shading[] = {
    EXTRA_VERSION_40,
    EXT(ARB_sample_shading),
index 9b22b91ac1bd7090b6d3dec24ca7e8a2adec6247..0c58b302481539a7a441847eb00e25bc2b9de038 100644 (file)
@@ -765,14 +765,6 @@ descriptor=[
   [ "MAX_TRANSFORM_FEEDBACK_BUFFERS", "CONTEXT_INT(Const.MaxTransformFeedbackBuffers), extra_ARB_transform_feedback3" ],
   [ "MAX_VERTEX_STREAMS", "CONTEXT_INT(Const.MaxVertexStreams), extra_ARB_transform_feedback3_ARB_gpu_shader5" ],
 
-# GL_ARB_geometry_shader4
-  [ "MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB", "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits), extra_gl32_ARB_geometry_shader4" ],
-  [ "MAX_GEOMETRY_OUTPUT_VERTICES_ARB", "CONTEXT_INT(Const.MaxGeometryOutputVertices), extra_gl32_ARB_geometry_shader4" ],
-  [ "MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB", "CONTEXT_INT(Const.MaxGeometryTotalOutputComponents), extra_gl32_ARB_geometry_shader4" ],
-  [ "MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB", "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxUniformComponents), extra_gl32_ARB_geometry_shader4" ],
-  [ "MAX_GEOMETRY_VARYING_COMPONENTS_ARB", "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxOutputComponents), extra_ARB_geometry_shader4" ],
-  [ "MAX_VERTEX_VARYING_COMPONENTS_ARB", "CONTEXT_INT(Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents), extra_ARB_geometry_shader4" ],
-
 # GL_ARB_color_buffer_float
   [ "RGBA_FLOAT_MODE_ARB", "BUFFER_FIELD(Visual.floatMode, TYPE_BOOLEAN), extra_core_ARB_color_buffer_float_and_new_buffers" ],
 
@@ -800,6 +792,10 @@ descriptor=[
   [ "CONTEXT_PROFILE_MASK", "CONTEXT_INT(Const.ProfileMask), extra_version_32" ],
   [ "MAX_GEOMETRY_INPUT_COMPONENTS", "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxInputComponents), extra_version_32" ],
   [ "MAX_GEOMETRY_OUTPUT_COMPONENTS", "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxOutputComponents), extra_version_32" ],
+  [ "MAX_GEOMETRY_TEXTURE_IMAGE_UNITS", "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits), extra_version_32" ],
+  [ "MAX_GEOMETRY_OUTPUT_VERTICES", "CONTEXT_INT(Const.MaxGeometryOutputVertices), extra_version_32" ],
+  [ "MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS", "CONTEXT_INT(Const.MaxGeometryTotalOutputComponents), extra_version_32" ],
+  [ "MAX_GEOMETRY_UNIFORM_COMPONENTS", "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxUniformComponents), extra_version_32" ],
 
 # GL_ARB_robustness
   [ "RESET_NOTIFICATION_STRATEGY_ARB", "CONTEXT_ENUM(Const.ResetStrategy), NO_EXTRA" ],
index 242efe8b5489bbba9004ce3b66bc20042fb7d8b6..c1b18a409c53747873ebae60dfcdef82ce285bc6 100644 (file)
@@ -3400,7 +3400,7 @@ struct gl_constants
     */
    GLuint MaxUserAssignableUniformLocations;
 
-   /** GL_ARB_geometry_shader4 */
+   /** geometry shader */
    GLuint MaxGeometryOutputVertices;
    GLuint MaxGeometryTotalOutputComponents;
 
@@ -3685,7 +3685,6 @@ struct gl_extensions
    GLboolean ARB_enhanced_layouts;
    GLboolean ARB_explicit_attrib_location;
    GLboolean ARB_explicit_uniform_location;
-   GLboolean ARB_geometry_shader4;
    GLboolean ARB_gpu_shader5;
    GLboolean ARB_gpu_shader_fp64;
    GLboolean ARB_half_float_vertex;
index 96b2246f48b5597c52e0f608d651683cc28fa683..04e9896a1fa7fac34d0934bdc17fc74560dbb1e2 100644 (file)
@@ -1689,7 +1689,6 @@ const struct enum_info everything[] = {
    { 0x8D9F, "GL_INT_2_10_10_10_REV" },
    { 0x8DA7, "GL_FRAMEBUFFER_ATTACHMENT_LAYERED" },
    { 0x8DA8, "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS" },
-   { 0x8DA9, "GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB" },
    { 0x8DAD, "GL_FLOAT_32_UNSIGNED_INT_24_8_REV" },
    { 0x8DB9, "GL_FRAMEBUFFER_SRGB" },
    { 0x8DBA, "GL_FRAMEBUFFER_SRGB_CAPABLE_EXT" },
@@ -1723,11 +1722,6 @@ const struct enum_info everything[] = {
    { 0x8DD7, "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY" },
    { 0x8DD8, "GL_UNSIGNED_INT_SAMPLER_BUFFER" },
    { 0x8DD9, "GL_GEOMETRY_SHADER" },
-   { 0x8DDA, "GL_GEOMETRY_VERTICES_OUT_ARB" },
-   { 0x8DDB, "GL_GEOMETRY_INPUT_TYPE_ARB" },
-   { 0x8DDC, "GL_GEOMETRY_OUTPUT_TYPE_ARB" },
-   { 0x8DDD, "GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB" },
-   { 0x8DDE, "GL_MAX_VERTEX_VARYING_COMPONENTS_ARB" },
    { 0x8DDF, "GL_MAX_GEOMETRY_UNIFORM_COMPONENTS" },
    { 0x8DE0, "GL_MAX_GEOMETRY_OUTPUT_VERTICES" },
    { 0x8DE1, "GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS" },