mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
mesa: fix GL_COLOR_SUM enum for drivers without ARB_vertex_program
Commit c13970808 (mesa: GL_EXT_secondary_color is not optional) changed
CHECK_EXTENSION2(EXT_secondary_color, ARB_vetex_program, cap)
to
CHECK_EXTENSION(ARB_vertex_program, cap)
However CHECK_EXTENSION2 checks that either extension is available, not
both. Remove the extension check entirely since the intent was for it to
always be enabled.
v2: Fix glGet*(GL_COLOR_SUM) too. Suggested by Ian.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: 9.2 10.0 <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
93b953d139
commit
739dc95e67
2 changed files with 1 additions and 3 deletions
|
|
@ -762,7 +762,6 @@ _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_EXTENSION(ARB_vertex_program, cap);
|
||||
if (ctx->Fog.ColorSumEnabled == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_FOG);
|
||||
|
|
@ -1443,7 +1442,6 @@ _mesa_IsEnabled( GLenum cap )
|
|||
case GL_COLOR_SUM_EXT:
|
||||
if (ctx->API != API_OPENGL_COMPAT)
|
||||
goto invalid_enum_error;
|
||||
CHECK_EXTENSION(ARB_vertex_program);
|
||||
return ctx->Fog.ColorSumEnabled;
|
||||
|
||||
/* GL_ARB_multisample */
|
||||
|
|
|
|||
|
|
@ -541,7 +541,7 @@ descriptor=[
|
|||
[ "TRANSPOSE_TEXTURE_MATRIX_ARB", "CONTEXT_MATRIX_T(TextureMatrixStack), NO_EXTRA" ],
|
||||
|
||||
# GL_EXT_secondary_color
|
||||
[ "COLOR_SUM", "CONTEXT_BOOL(Fog.ColorSumEnabled), extra_ARB_vertex_program" ],
|
||||
[ "COLOR_SUM", "CONTEXT_BOOL(Fog.ColorSumEnabled), NO_EXTRA" ],
|
||||
[ "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" ],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue