mesa: GL_EXT_fog_coord is not optional
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 28 Jun 2013 01:20:28 +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>
14 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/fog.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 511e4998eba8a044849afc58f170736a2c5d3375..ec557a7f2859ee5bbbd8bb9f4550b91ad490da93 100644 (file)
@@ -67,7 +67,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_blend_func_separate = true;
    ctx->Extensions.EXT_blend_minmax = true;
    ctx->Extensions.EXT_framebuffer_blit = true;
-   ctx->Extensions.EXT_fog_coord = true;
    ctx->Extensions.EXT_gpu_program_parameters = true;
    ctx->Extensions.EXT_packed_depth_stencil = true;
    ctx->Extensions.EXT_pixel_buffer_object = true;
index 0ec077e26233880241c6b2e59238d0c8d43d48be..7188358c416768c36de8b4374b6f1e8d35446493 100644 (file)
@@ -91,7 +91,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_blend_minmax = true;
    ctx->Extensions.EXT_draw_buffers2 = true;
    ctx->Extensions.EXT_framebuffer_blit = true;
-   ctx->Extensions.EXT_fog_coord = true;
    ctx->Extensions.EXT_framebuffer_sRGB = true;
    ctx->Extensions.EXT_gpu_program_parameters = true;
    ctx->Extensions.EXT_packed_depth_stencil = true;
index a403c24c80985f335e8ed3c79bc8dfcae4d8e91a..8002d4fdfa7a4e26b2d6f360004058f58c1be681 100644 (file)
@@ -198,7 +198,6 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
        /* Enable any supported extensions. */
        ctx->Extensions.EXT_blend_color = true;
        ctx->Extensions.EXT_blend_minmax = true;
-       ctx->Extensions.EXT_fog_coord = true;
        ctx->Extensions.EXT_framebuffer_blit = true;
        ctx->Extensions.EXT_packed_depth_stencil = true;
        ctx->Extensions.EXT_texture_filter_anisotropic = true;
index 1722e0484961d8eb5a72867dba3eed17f28f7cfa..529ffd0896caaf7cb279394caeb98799cbaccdac 100644 (file)
@@ -385,7 +385,6 @@ GLboolean r200CreateContext( gl_api api,
    ctx->Extensions.ARB_texture_env_crossbar = true;
    ctx->Extensions.EXT_blend_color = true;
    ctx->Extensions.EXT_blend_minmax = true;
-   ctx->Extensions.EXT_fog_coord = true;
    ctx->Extensions.EXT_packed_depth_stencil = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
index 67385763dc7ca66f196ebfec153dcab52928af49..077674c26c7eb364d50d1ea21d58773aa605fc52 100644 (file)
@@ -344,7 +344,6 @@ r100CreateContext( gl_api api,
    ctx->Extensions.ARB_texture_env_combine = true;
    ctx->Extensions.ARB_texture_env_crossbar = true;
    ctx->Extensions.ARB_texture_env_dot3 = true;
-   ctx->Extensions.EXT_fog_coord = true;
    ctx->Extensions.EXT_packed_depth_stencil = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
index 7ede02c9402b85f5c3ddf60c09fb95339af4ba04..5c72b3cd7ac885c09eeeedd6b0ff8e299183c591 100644 (file)
@@ -1420,7 +1420,6 @@ _mesa_IsEnabled( GLenum cap )
       case GL_FOG_COORDINATE_ARRAY_EXT:
          if (ctx->API != API_OPENGL_COMPAT)
             goto invalid_enum_error;
-         CHECK_EXTENSION(EXT_fog_coord);
          return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled != 0);
       case GL_SECONDARY_COLOR_ARRAY_EXT:
          if (ctx->API != API_OPENGL_COMPAT)
index 276af33495459d7eda101e0326e418517311bae6..20f3a766d1740b3ede6eb825d97367265ac3c41c 100644 (file)
@@ -180,7 +180,7 @@ static const struct extension extension_table[] = {
    { "GL_EXT_draw_buffers2",                       o(EXT_draw_buffers2),                       GL,             2006 },
    { "GL_EXT_draw_instanced",                      o(ARB_draw_instanced),                      GL,             2006 },
    { "GL_EXT_draw_range_elements",                 o(dummy_true),                              GLL,            1997 },
-   { "GL_EXT_fog_coord",                           o(EXT_fog_coord),                           GLL,            1999 },
+   { "GL_EXT_fog_coord",                           o(dummy_true),                              GLL,            1999 },
    { "GL_EXT_framebuffer_blit",                    o(EXT_framebuffer_blit),                    GL,             2005 },
    { "GL_EXT_framebuffer_multisample",             o(EXT_framebuffer_multisample),             GL,             2005 },
    { "GL_EXT_framebuffer_multisample_blit_scaled", o(EXT_framebuffer_multisample_blit_scaled), GL,             2011 },
@@ -422,7 +422,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.EXT_blend_minmax = GL_TRUE;
    ctx->Extensions.EXT_depth_bounds_test = GL_TRUE;
    ctx->Extensions.EXT_draw_buffers2 = GL_TRUE;
-   ctx->Extensions.EXT_fog_coord = GL_TRUE;
    ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
    ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
    ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;
index 1bd072fb3af80a2c4f1f85839999ba63e108880f..89153912e235adb6e658b8969a35118452a21ffc 100644 (file)
@@ -162,7 +162,7 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params )
          break;
       case GL_FOG_COORDINATE_SOURCE_EXT: {
         GLenum p = (GLenum) (GLint) *params;
-         if (ctx->API != API_OPENGL_COMPAT || !ctx->Extensions.EXT_fog_coord ||
+         if (ctx->API != API_OPENGL_COMPAT ||
              (p != GL_FOG_COORDINATE_EXT && p != GL_FRAGMENT_DEPTH_EXT)) {
            _mesa_error(ctx, GL_INVALID_ENUM, "glFog");
            return;
index e4e606a4bc7fc7cce4a6011127b97274e84138da..ac9c1d49a63b7e4e756d4eed4bd8a50da30bcd68 100644 (file)
@@ -272,12 +272,6 @@ static const int extra_flush_current[] = {
    EXTRA_END
 };
 
-static const int extra_EXT_fog_coord_flush_current[] = {
-   EXT(EXT_fog_coord),
-   EXTRA_FLUSH_CURRENT,
-   EXTRA_END
-};
-
 static const int extra_EXT_texture_integer[] = {
    EXT(EXT_texture_integer),
    EXTRA_END
@@ -339,7 +333,6 @@ static const int extra_MESA_texture_array_es3[] = {
 
 EXTRA_EXT(ARB_texture_cube_map);
 EXTRA_EXT(MESA_texture_array);
-EXTRA_EXT(EXT_fog_coord);
 EXTRA_EXT(NV_fog_distance);
 EXTRA_EXT(EXT_texture_filter_anisotropic);
 EXTRA_EXT(NV_point_sprite);
index 68b280a0781d311b5c0aa43deab4ecbaa401e6ef..91ddf807af8c002ca10c1ee09db5d1af6690b6de 100644 (file)
@@ -552,11 +552,11 @@ descriptor=[
   [ "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" ],
-  [ "FOG_COORDINATE_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_FOG].Enabled), extra_EXT_fog_coord" ],
-  [ "FOG_COORDINATE_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_FOG].Type), extra_EXT_fog_coord" ],
-  [ "FOG_COORDINATE_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_FOG].Stride), extra_EXT_fog_coord" ],
-  [ "FOG_COORDINATE_SOURCE", "CONTEXT_ENUM(Fog.FogCoordinateSource), extra_EXT_fog_coord" ],
+  [ "CURRENT_FOG_COORDINATE", "CONTEXT_FLOAT(Current.Attrib[VERT_ATTRIB_FOG][0]), extra_flush_current" ],
+  [ "FOG_COORDINATE_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_FOG].Enabled), NO_EXTRA" ],
+  [ "FOG_COORDINATE_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_FOG].Type), NO_EXTRA" ],
+  [ "FOG_COORDINATE_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_FOG].Stride), NO_EXTRA" ],
+  [ "FOG_COORDINATE_SOURCE", "CONTEXT_ENUM(Fog.FogCoordinateSource), NO_EXTRA" ],
 
 # GL_NV_fog_distance
   [ "FOG_DISTANCE_MODE_NV", "CONTEXT_ENUM(Fog.FogDistanceMode), extra_NV_fog_distance" ],
index 895b9ddf73dd4a3638980f18b0d26cc2d07ac91e..e5ef8017713dd2aa4b7f372062e8938d94885add 100644 (file)
@@ -3054,7 +3054,6 @@ struct gl_extensions
    GLboolean EXT_blend_minmax;
    GLboolean EXT_depth_bounds_test;
    GLboolean EXT_draw_buffers2;
-   GLboolean EXT_fog_coord;
    GLboolean EXT_framebuffer_blit;
    GLboolean EXT_framebuffer_multisample;
    GLboolean EXT_framebuffer_multisample_blit_scaled;
index 8f3b45b4516f57229b2d34bfe3ec6ac94f1223d3..16185bffc919e2ab4dd2b8123ac7b5dc54717107 100644 (file)
@@ -205,7 +205,6 @@ compute_version(struct gl_context *ctx)
                               ctx->Extensions.EXT_blend_color &&
                               ctx->Extensions.EXT_blend_func_separate &&
                               ctx->Extensions.EXT_blend_minmax &&
-                              ctx->Extensions.EXT_fog_coord &&
                               ctx->Extensions.EXT_point_parameters);
    const GLboolean ver_1_5 = (ver_1_4 &&
                               ctx->Extensions.ARB_occlusion_query &&
index 4eadb98b90730990cd6984d3471ea811736a9e37..e2da633477dfd875b54fafb69628662a90027517 100644 (file)
@@ -1149,11 +1149,6 @@ vtxAttribItem: POSITION
        }
        | FOGCOORD
        {
-          if (!state->ctx->Extensions.EXT_fog_coord) {
-             yyerror(& @1, state, "GL_EXT_fog_coord not supported");
-             YYERROR;
-          }
-
           $$ = VERT_ATTRIB_FOG;
        }
        | TEXCOORD optTexCoordUnitNum
index 99169b96df197b571c330c53e5d63f61e69c64ae..41bb18ba8e447f2696e1f700e95775ac34bbbd30 100644 (file)
@@ -552,7 +552,6 @@ void st_init_extensions(struct st_context *st)
    ctx->Extensions.EXT_blend_func_separate = GL_TRUE;
    ctx->Extensions.EXT_blend_minmax = GL_TRUE;
    ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
-   ctx->Extensions.EXT_fog_coord = GL_TRUE;
    ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE;
    ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;
    ctx->Extensions.EXT_point_parameters = GL_TRUE;