diff options
author | Ian Romanick <[email protected]> | 2013-06-27 18:20:27 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-06-28 13:35:22 -0700 |
commit | c139708087ead063da7ac64126af69f2fe7bcf1e (patch) | |
tree | 60637b08a069d0ecaa399d0d59ae39f22e1f82c0 /src | |
parent | b5305a303bd13f91a00f36f205b767d1bfef2ab5 (diff) |
mesa: GL_EXT_secondary_color is not optional
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 <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_extensions.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_extensions.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_context.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_context.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_context.c | 1 | ||||
-rw-r--r-- | src/mesa/main/enable.c | 5 | ||||
-rw-r--r-- | src/mesa/main/extensions.c | 3 | ||||
-rw-r--r-- | src/mesa/main/get.c | 8 | ||||
-rw-r--r-- | src/mesa/main/get_hash_params.py | 12 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 1 | ||||
-rw-r--r-- | src/mesa/main/version.c | 3 | ||||
-rw-r--r-- | src/mesa/program/program_parse.y | 5 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 1 |
13 files changed, 10 insertions, 33 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_extensions.c b/src/mesa/drivers/dri/i915/intel_extensions.c index eecb291cd9f..511e4998eba 100644 --- a/src/mesa/drivers/dri/i915/intel_extensions.c +++ b/src/mesa/drivers/dri/i915/intel_extensions.c @@ -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; diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index fdd05089e56..0ec077e2623 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/dri/i965/intel_extensions.c @@ -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; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 7f22ae2c1e1..a403c24c809 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -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; diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 5d2f79bab5c..1722e048496 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -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; diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c index fbcac6793d6..67385763dc7 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_context.c @@ -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; diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index fdde24e36fa..7ede02c9402 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -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 */ diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 0651ba110d4..276af334954 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -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; diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 64deaa7d332..e4e606a4bc7 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -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); diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index 5b5ccbbb66a..68b280a0781 100644 --- a/src/mesa/main/get_hash_params.py +++ b/src/mesa/main/get_hash_params.py @@ -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" ], diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 9a2409c77c7..895b9ddf73d 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -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; diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c index cdd5ed316af..8f3b45b4516 100644 --- a/src/mesa/main/version.c +++ b/src/mesa/main/version.c @@ -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); diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y index cbf3fe6ca7c..4eadb98b907 100644 --- a/src/mesa/program/program_parse.y +++ b/src/mesa/program/program_parse.y @@ -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 diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index d0dd2f405c6..99169b96df1 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -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; |