mesa: Remove the now unused _NEW_ARRAY state change flag.

Is no longer used, so we have less occasions where NewState is non zero.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
This commit is contained in:
Mathias Fröhlich
2019-04-03 13:25:22 +02:00
parent 7af047c373
commit 68aaf0a4e3
6 changed files with 2 additions and 23 deletions

View File

@@ -355,7 +355,6 @@ static struct dirty_bit_map mesa_bits[] = {
DEFINE_BIT(_NEW_TRANSFORM), DEFINE_BIT(_NEW_TRANSFORM),
DEFINE_BIT(_NEW_VIEWPORT), DEFINE_BIT(_NEW_VIEWPORT),
DEFINE_BIT(_NEW_TEXTURE_STATE), DEFINE_BIT(_NEW_TEXTURE_STATE),
DEFINE_BIT(_NEW_ARRAY),
DEFINE_BIT(_NEW_RENDERMODE), DEFINE_BIT(_NEW_RENDERMODE),
DEFINE_BIT(_NEW_BUFFERS), DEFINE_BIT(_NEW_BUFFERS),
DEFINE_BIT(_NEW_CURRENT_ATTRIB), DEFINE_BIT(_NEW_CURRENT_ATTRIB),

View File

@@ -1049,7 +1049,6 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, bool no_error)
*/ */
_mesa_set_draw_vao(ctx, ctx->Array._EmptyVAO, 0); _mesa_set_draw_vao(ctx, ctx->Array._EmptyVAO, 0);
ctx->NewState |= _NEW_ARRAY;
_mesa_reference_vao(ctx, &ctx->Array.VAO, newObj); _mesa_reference_vao(ctx, &ctx->Array.VAO, newObj);
} }

View File

@@ -1839,7 +1839,6 @@ _mesa_PopClientAttrib(void)
(struct gl_array_attrib *) node->data; (struct gl_array_attrib *) node->data;
restore_array_attrib(ctx, &ctx->Array, attr); restore_array_attrib(ctx, &ctx->Array, attr);
free_array_attrib_data(ctx, attr); free_array_attrib_data(ctx, attr);
ctx->NewState |= _NEW_ARRAY;
break; break;
} }
default: default:

View File

@@ -73,7 +73,7 @@ void
_mesa_print_state( const char *msg, GLuint state ) _mesa_print_state( const char *msg, GLuint state )
{ {
_mesa_debug(NULL, _mesa_debug(NULL,
"%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
msg, msg,
state, state,
(state & _NEW_MODELVIEW) ? "ctx->ModelView, " : "", (state & _NEW_MODELVIEW) ? "ctx->ModelView, " : "",
@@ -96,7 +96,6 @@ _mesa_print_state( const char *msg, GLuint state )
(state & _NEW_TRANSFORM) ? "ctx->Transform, " : "", (state & _NEW_TRANSFORM) ? "ctx->Transform, " : "",
(state & _NEW_VIEWPORT) ? "ctx->Viewport, " : "", (state & _NEW_VIEWPORT) ? "ctx->Viewport, " : "",
(state & _NEW_TEXTURE_STATE) ? "ctx->Texture(State), " : "", (state & _NEW_TEXTURE_STATE) ? "ctx->Texture(State), " : "",
(state & _NEW_ARRAY) ? "ctx->Array, " : "",
(state & _NEW_RENDERMODE) ? "ctx->RenderMode, " : "", (state & _NEW_RENDERMODE) ? "ctx->RenderMode, " : "",
(state & _NEW_BUFFERS) ? "ctx->Visual, ctx->DrawBuffer,, " : ""); (state & _NEW_BUFFERS) ? "ctx->Visual, ctx->DrawBuffer,, " : "");
} }

View File

@@ -4444,7 +4444,7 @@ struct gl_matrix_stack
#define _NEW_TRANSFORM (1u << 17) /**< gl_context::Transform */ #define _NEW_TRANSFORM (1u << 17) /**< gl_context::Transform */
#define _NEW_VIEWPORT (1u << 18) /**< gl_context::Viewport */ #define _NEW_VIEWPORT (1u << 18) /**< gl_context::Viewport */
#define _NEW_TEXTURE_STATE (1u << 19) /**< gl_context::Texture (states only) */ #define _NEW_TEXTURE_STATE (1u << 19) /**< gl_context::Texture (states only) */
#define _NEW_ARRAY (1u << 20) /**< gl_context::Array */ /* gap */
#define _NEW_RENDERMODE (1u << 21) /**< gl_context::RenderMode, etc */ #define _NEW_RENDERMODE (1u << 21) /**< gl_context::RenderMode, etc */
#define _NEW_BUFFERS (1u << 22) /**< gl_context::Visual, DrawBuffer, */ #define _NEW_BUFFERS (1u << 22) /**< gl_context::Visual, DrawBuffer, */
#define _NEW_CURRENT_ATTRIB (1u << 23) /**< gl_context::Current */ #define _NEW_CURRENT_ATTRIB (1u << 23) /**< gl_context::Current */

View File

@@ -179,8 +179,6 @@ _mesa_vertex_attrib_binding(struct gl_context *ctx,
array->BufferBindingIndex = bindingIndex; array->BufferBindingIndex = bindingIndex;
vao->NewArrays |= vao->Enabled & array_bit; vao->NewArrays |= vao->Enabled & array_bit;
if (vao == ctx->Array.VAO)
ctx->NewState |= _NEW_ARRAY;
} }
} }
@@ -217,8 +215,6 @@ _mesa_bind_vertex_buffer(struct gl_context *ctx,
} }
vao->NewArrays |= vao->Enabled & binding->_BoundArrays; vao->NewArrays |= vao->Enabled & binding->_BoundArrays;
if (vao == ctx->Array.VAO)
ctx->NewState |= _NEW_ARRAY;
} }
} }
@@ -240,8 +236,6 @@ vertex_binding_divisor(struct gl_context *ctx,
if (binding->InstanceDivisor != divisor) { if (binding->InstanceDivisor != divisor) {
binding->InstanceDivisor = divisor; binding->InstanceDivisor = divisor;
vao->NewArrays |= vao->Enabled & binding->_BoundArrays; vao->NewArrays |= vao->Enabled & binding->_BoundArrays;
if (vao == ctx->Array.VAO)
ctx->NewState |= _NEW_ARRAY;
} }
} }
@@ -360,8 +354,6 @@ _mesa_update_array_format(struct gl_context *ctx,
normalized, integer, doubles); normalized, integer, doubles);
vao->NewArrays |= vao->Enabled & VERT_BIT(attrib); vao->NewArrays |= vao->Enabled & VERT_BIT(attrib);
if (vao == ctx->Array.VAO)
ctx->NewState |= _NEW_ARRAY;
} }
/** /**
@@ -1098,9 +1090,6 @@ _mesa_enable_vertex_array_attribs(struct gl_context *ctx,
vao->Enabled |= attrib_bits; vao->Enabled |= attrib_bits;
vao->NewArrays |= attrib_bits; vao->NewArrays |= attrib_bits;
if (vao == ctx->Array.VAO)
ctx->NewState |= _NEW_ARRAY;
/* Update the map mode if needed */ /* Update the map mode if needed */
if (attrib_bits & (VERT_BIT_POS|VERT_BIT_GENERIC0)) if (attrib_bits & (VERT_BIT_POS|VERT_BIT_GENERIC0))
update_attribute_map_mode(ctx, vao); update_attribute_map_mode(ctx, vao);
@@ -1185,9 +1174,6 @@ _mesa_disable_vertex_array_attribs(struct gl_context *ctx,
vao->Enabled &= ~attrib_bits; vao->Enabled &= ~attrib_bits;
vao->NewArrays |= attrib_bits; vao->NewArrays |= attrib_bits;
if (vao == ctx->Array.VAO)
ctx->NewState |= _NEW_ARRAY;
/* Update the map mode if needed */ /* Update the map mode if needed */
if (attrib_bits & (VERT_BIT_POS|VERT_BIT_GENERIC0)) if (attrib_bits & (VERT_BIT_POS|VERT_BIT_GENERIC0))
update_attribute_map_mode(ctx, vao); update_attribute_map_mode(ctx, vao);
@@ -1894,8 +1880,6 @@ _mesa_LockArraysEXT(GLint first, GLsizei count)
ctx->Array.LockFirst = first; ctx->Array.LockFirst = first;
ctx->Array.LockCount = count; ctx->Array.LockCount = count;
ctx->NewState |= _NEW_ARRAY;
} }
@@ -1914,7 +1898,6 @@ _mesa_UnlockArraysEXT( void )
ctx->Array.LockFirst = 0; ctx->Array.LockFirst = 0;
ctx->Array.LockCount = 0; ctx->Array.LockCount = 0;
ctx->NewState |= _NEW_ARRAY;
} }