mesa: GL_EXT_secondary_color is not optional
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 28 Jun 2013 01:20:27 +0000 (18:20 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 28 Jun 2013 20:35:22 +0000 (13:35 -0700)
Every driver left in Mesa enables this extension all the time.  There's
no reason to let it be optional.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
13 files changed:
src/mesa/drivers/dri/i915/intel_extensions.c
src/mesa/drivers/dri/i965/intel_extensions.c
src/mesa/drivers/dri/nouveau/nouveau_context.c
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/radeon/radeon_context.c
src/mesa/main/enable.c
src/mesa/main/extensions.c
src/mesa/main/get.c
src/mesa/main/get_hash_params.py
src/mesa/main/mtypes.h
src/mesa/main/version.c
src/mesa/program/program_parse.y
src/mesa/state_tracker/st_extensions.c

index eecb291cd9f4d09c96c8f9285a5c6e550e57b383..511e4998eba8a044849afc58f170736a2c5d3375 100644 (file)
@@ -73,7 +73,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_pixel_buffer_object = true;
    ctx->Extensions.EXT_point_parameters = true;
    ctx->Extensions.EXT_provoking_vertex = true;
-   ctx->Extensions.EXT_secondary_color = true;
    ctx->Extensions.EXT_separate_shader_objects = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
index fdd05089e5682c56e14f092fbfea7bfc44d88d31..0ec077e26233880241c6b2e59238d0c8d43d48be 100644 (file)
@@ -99,7 +99,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_pixel_buffer_object = true;
    ctx->Extensions.EXT_point_parameters = true;
    ctx->Extensions.EXT_provoking_vertex = true;
-   ctx->Extensions.EXT_secondary_color = true;
    ctx->Extensions.EXT_separate_shader_objects = true;
    ctx->Extensions.EXT_texture_array = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
index 7f22ae2c1e13d3686a2095aecada622ac43684b4..a403c24c80985f335e8ed3c79bc8dfcae4d8e91a 100644 (file)
@@ -201,7 +201,6 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
        ctx->Extensions.EXT_fog_coord = true;
        ctx->Extensions.EXT_framebuffer_blit = true;
        ctx->Extensions.EXT_packed_depth_stencil = true;
-       ctx->Extensions.EXT_secondary_color = true;
        ctx->Extensions.EXT_texture_filter_anisotropic = true;
        ctx->Extensions.NV_blend_square = true;
        ctx->Extensions.NV_texture_env_combine4 = true;
index 5d2f79bab5c8078c68131f68e35e1f2c1d95c985..1722e0484961d8eb5a72867dba3eed17f28f7cfa 100644 (file)
@@ -387,7 +387,6 @@ GLboolean r200CreateContext( gl_api api,
    ctx->Extensions.EXT_blend_minmax = true;
    ctx->Extensions.EXT_fog_coord = true;
    ctx->Extensions.EXT_packed_depth_stencil = true;
-   ctx->Extensions.EXT_secondary_color = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
    ctx->Extensions.EXT_texture_mirror_clamp = true;
index fbcac6793d6e7aa90da1a0656ba73dd198e0d6f4..67385763dc7ca66f196ebfec153dcab52928af49 100644 (file)
@@ -346,7 +346,6 @@ r100CreateContext( gl_api api,
    ctx->Extensions.ARB_texture_env_dot3 = true;
    ctx->Extensions.EXT_fog_coord = true;
    ctx->Extensions.EXT_packed_depth_stencil = true;
-   ctx->Extensions.EXT_secondary_color = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
    ctx->Extensions.EXT_texture_mirror_clamp = true;
index fdde24e36fa8544b2ec803592ed6c863d963a718..7ede02c9402b85f5c3ddf60c09fb95339af4ba04 100644 (file)
@@ -755,7 +755,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
       case GL_COLOR_SUM_EXT:
          if (ctx->API != API_OPENGL_COMPAT)
             goto invalid_enum_error;
-         CHECK_EXTENSION2(EXT_secondary_color, ARB_vertex_program, cap);
+         CHECK_EXTENSION(ARB_vertex_program, cap);
          if (ctx->Fog.ColorSumEnabled == state)
             return;
          FLUSH_VERTICES(ctx, _NEW_FOG);
@@ -1425,7 +1425,6 @@ _mesa_IsEnabled( GLenum cap )
       case GL_SECONDARY_COLOR_ARRAY_EXT:
          if (ctx->API != API_OPENGL_COMPAT)
             goto invalid_enum_error;
-         CHECK_EXTENSION(EXT_secondary_color);
          return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled != 0);
       case GL_POINT_SIZE_ARRAY_OES:
          if (ctx->API != API_OPENGLES)
@@ -1441,7 +1440,7 @@ _mesa_IsEnabled( GLenum cap )
       case GL_COLOR_SUM_EXT:
          if (ctx->API != API_OPENGL_COMPAT)
             goto invalid_enum_error;
-         CHECK_EXTENSION2(EXT_secondary_color, ARB_vertex_program);
+         CHECK_EXTENSION(ARB_vertex_program);
          return ctx->Fog.ColorSumEnabled;
 
       /* GL_ARB_multisample */
index 0651ba110d475fdeeeee2ae46c8333376ecec2ab..276af33495459d7eda101e0326e418517311bae6 100644 (file)
@@ -198,7 +198,7 @@ static const struct extension extension_table[] = {
    { "GL_EXT_polygon_offset",                      o(dummy_true),                              GLL,            1995 },
    { "GL_EXT_provoking_vertex",                    o(EXT_provoking_vertex),                    GL,             2009 },
    { "GL_EXT_rescale_normal",                      o(dummy_true),                              GLL,            1997 },
-   { "GL_EXT_secondary_color",                     o(EXT_secondary_color),                     GLL,            1999 },
+   { "GL_EXT_secondary_color",                     o(dummy_true),                              GLL,            1999 },
    { "GL_EXT_separate_shader_objects",             o(EXT_separate_shader_objects),             GLL,            2008 },
    { "GL_EXT_separate_specular_color",             o(dummy_true),                              GLL,            1997 },
    { "GL_EXT_shadow_funcs",                        o(EXT_shadow_funcs),                        GLL,            2002 },
@@ -429,7 +429,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.EXT_point_parameters = GL_TRUE;
    ctx->Extensions.EXT_provoking_vertex = GL_TRUE;
    ctx->Extensions.EXT_shadow_funcs = GL_TRUE;
-   ctx->Extensions.EXT_secondary_color = GL_TRUE;
    ctx->Extensions.EXT_stencil_two_side = GL_TRUE;
    ctx->Extensions.EXT_texture_array = GL_TRUE;
    ctx->Extensions.EXT_texture_compression_latc = GL_TRUE;
index 64deaa7d332080c2a6edcc120a4f0b4a8156bfbb..e4e606a4bc7fc7cce4a6011127b97274e84138da 100644 (file)
@@ -272,12 +272,6 @@ static const int extra_flush_current[] = {
    EXTRA_END
 };
 
-static const int extra_EXT_secondary_color_flush_current[] = {
-   EXT(EXT_secondary_color),
-   EXTRA_FLUSH_CURRENT,
-   EXTRA_END
-};
-
 static const int extra_EXT_fog_coord_flush_current[] = {
    EXT(EXT_fog_coord),
    EXTRA_FLUSH_CURRENT,
@@ -345,8 +339,6 @@ static const int extra_MESA_texture_array_es3[] = {
 
 EXTRA_EXT(ARB_texture_cube_map);
 EXTRA_EXT(MESA_texture_array);
-EXTRA_EXT2(EXT_secondary_color, ARB_vertex_program);
-EXTRA_EXT(EXT_secondary_color);
 EXTRA_EXT(EXT_fog_coord);
 EXTRA_EXT(NV_fog_distance);
 EXTRA_EXT(EXT_texture_filter_anisotropic);
index 5b5ccbbb66a1ba3dc1c6a1bb06a512010a16f9a5..68b280a0781d311b5c0aa43deab4ecbaa401e6ef 100644 (file)
@@ -544,12 +544,12 @@ descriptor=[
   [ "TRANSPOSE_TEXTURE_MATRIX_ARB", "CONTEXT_MATRIX_T(TextureMatrixStack), NO_EXTRA" ],
 
 # GL_EXT_secondary_color
-  [ "COLOR_SUM", "CONTEXT_BOOL(Fog.ColorSumEnabled), extra_EXT_secondary_color_ARB_vertex_program" ],
-  [ "CURRENT_SECONDARY_COLOR", "CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_COLOR1][0], TYPE_FLOATN_4), extra_EXT_secondary_color_flush_current" ],
-  [ "SECONDARY_COLOR_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_COLOR1].Enabled), extra_EXT_secondary_color" ],
-  [ "SECONDARY_COLOR_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_COLOR1].Type), extra_EXT_secondary_color" ],
-  [ "SECONDARY_COLOR_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR1].Stride), extra_EXT_secondary_color" ],
-  [ "SECONDARY_COLOR_ARRAY_SIZE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR1].Size), extra_EXT_secondary_color" ],
+  [ "COLOR_SUM", "CONTEXT_BOOL(Fog.ColorSumEnabled), extra_ARB_vertex_program" ],
+  [ "CURRENT_SECONDARY_COLOR", "CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_COLOR1][0], TYPE_FLOATN_4), extra_flush_current" ],
+  [ "SECONDARY_COLOR_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_COLOR1].Enabled), NO_EXTRA" ],
+  [ "SECONDARY_COLOR_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_COLOR1].Type), NO_EXTRA" ],
+  [ "SECONDARY_COLOR_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR1].Stride), NO_EXTRA" ],
+  [ "SECONDARY_COLOR_ARRAY_SIZE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR1].Size), NO_EXTRA" ],
 
 # GL_EXT_fog_coord
   [ "CURRENT_FOG_COORDINATE", "CONTEXT_FLOAT(Current.Attrib[VERT_ATTRIB_FOG][0]), extra_EXT_fog_coord_flush_current" ],
index 9a2409c77c73adfbf4cbf63772b8d907fe7fbc5d..895b9ddf73dd4a3638980f18b0d26cc2d07ac91e 100644 (file)
@@ -3067,7 +3067,6 @@ struct gl_extensions
    GLboolean EXT_point_parameters;
    GLboolean EXT_provoking_vertex;
    GLboolean EXT_shadow_funcs;
-   GLboolean EXT_secondary_color;
    GLboolean EXT_separate_shader_objects;
    GLboolean EXT_stencil_two_side;
    GLboolean EXT_texture3D;
index cdd5ed316af7fa42f494f6ad10522f3bb0d99ead..8f3b45b4516f57229b2d34bfe3ec6ac94f1223d3 100644 (file)
@@ -206,8 +206,7 @@ compute_version(struct gl_context *ctx)
                               ctx->Extensions.EXT_blend_func_separate &&
                               ctx->Extensions.EXT_blend_minmax &&
                               ctx->Extensions.EXT_fog_coord &&
-                              ctx->Extensions.EXT_point_parameters &&
-                              ctx->Extensions.EXT_secondary_color);
+                              ctx->Extensions.EXT_point_parameters);
    const GLboolean ver_1_5 = (ver_1_4 &&
                               ctx->Extensions.ARB_occlusion_query &&
                               ctx->Extensions.EXT_shadow_funcs);
index cbf3fe6ca7ce48fd244905fda1fa0d403af9dca8..4eadb98b90730990cd6984d3471ea811736a9e37 100644 (file)
@@ -1145,11 +1145,6 @@ vtxAttribItem: POSITION
        }
        | COLOR optColorType
        {
-          if (!state->ctx->Extensions.EXT_secondary_color) {
-             yyerror(& @2, state, "GL_EXT_secondary_color not supported");
-             YYERROR;
-          }
-
           $$ = VERT_ATTRIB_COLOR0 + $2;
        }
        | FOGCOORD
index d0dd2f405c638d9c681ac60cd3307908c835f096..99169b96df197b571c330c53e5d63f61e69c64ae 100644 (file)
@@ -557,7 +557,6 @@ void st_init_extensions(struct st_context *st)
    ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;
    ctx->Extensions.EXT_point_parameters = GL_TRUE;
    ctx->Extensions.EXT_provoking_vertex = GL_TRUE;
-   ctx->Extensions.EXT_secondary_color = GL_TRUE;
    ctx->Extensions.EXT_separate_shader_objects = GL_TRUE;
    ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
    ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE;