From: Mathias Fröhlich Date: Wed, 3 Apr 2019 11:25:22 +0000 (+0200) Subject: mesa: Remove the now unused _NEW_ARRAY state change flag. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=68aaf0a4e35da67b2bda5403015c3e1bc26cee25;p=mesa.git 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 Signed-off-by: Mathias Fröhlich --- diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 5743fd5b8ae..938b9defeda 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -355,7 +355,6 @@ static struct dirty_bit_map mesa_bits[] = { DEFINE_BIT(_NEW_TRANSFORM), DEFINE_BIT(_NEW_VIEWPORT), DEFINE_BIT(_NEW_TEXTURE_STATE), - DEFINE_BIT(_NEW_ARRAY), DEFINE_BIT(_NEW_RENDERMODE), DEFINE_BIT(_NEW_BUFFERS), DEFINE_BIT(_NEW_CURRENT_ATTRIB), diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 63138096da6..a6d48f5ffed 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -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); - ctx->NewState |= _NEW_ARRAY; _mesa_reference_vao(ctx, &ctx->Array.VAO, newObj); } diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index fd130857179..fe6c5a00460 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1839,7 +1839,6 @@ _mesa_PopClientAttrib(void) (struct gl_array_attrib *) node->data; restore_array_attrib(ctx, &ctx->Array, attr); free_array_attrib_data(ctx, attr); - ctx->NewState |= _NEW_ARRAY; break; } default: diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index b1fa1f067ff..db11ae35a25 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -73,7 +73,7 @@ void _mesa_print_state( const char *msg, GLuint state ) { _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, state, (state & _NEW_MODELVIEW) ? "ctx->ModelView, " : "", @@ -96,7 +96,6 @@ _mesa_print_state( const char *msg, GLuint state ) (state & _NEW_TRANSFORM) ? "ctx->Transform, " : "", (state & _NEW_VIEWPORT) ? "ctx->Viewport, " : "", (state & _NEW_TEXTURE_STATE) ? "ctx->Texture(State), " : "", - (state & _NEW_ARRAY) ? "ctx->Array, " : "", (state & _NEW_RENDERMODE) ? "ctx->RenderMode, " : "", (state & _NEW_BUFFERS) ? "ctx->Visual, ctx->DrawBuffer,, " : ""); } diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index abe91699a81..0ca87561f05 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -4444,7 +4444,7 @@ struct gl_matrix_stack #define _NEW_TRANSFORM (1u << 17) /**< gl_context::Transform */ #define _NEW_VIEWPORT (1u << 18) /**< gl_context::Viewport */ #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_BUFFERS (1u << 22) /**< gl_context::Visual, DrawBuffer, */ #define _NEW_CURRENT_ATTRIB (1u << 23) /**< gl_context::Current */ diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index e6057c7f881..fad0c227d49 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -179,8 +179,6 @@ _mesa_vertex_attrib_binding(struct gl_context *ctx, array->BufferBindingIndex = bindingIndex; 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; - if (vao == ctx->Array.VAO) - ctx->NewState |= _NEW_ARRAY; } } @@ -240,8 +236,6 @@ vertex_binding_divisor(struct gl_context *ctx, if (binding->InstanceDivisor != divisor) { binding->InstanceDivisor = divisor; 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); 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->NewArrays |= attrib_bits; - if (vao == ctx->Array.VAO) - ctx->NewState |= _NEW_ARRAY; - /* Update the map mode if needed */ if (attrib_bits & (VERT_BIT_POS|VERT_BIT_GENERIC0)) update_attribute_map_mode(ctx, vao); @@ -1185,9 +1174,6 @@ _mesa_disable_vertex_array_attribs(struct gl_context *ctx, vao->Enabled &= ~attrib_bits; vao->NewArrays |= attrib_bits; - if (vao == ctx->Array.VAO) - ctx->NewState |= _NEW_ARRAY; - /* Update the map mode if needed */ if (attrib_bits & (VERT_BIT_POS|VERT_BIT_GENERIC0)) update_attribute_map_mode(ctx, vao); @@ -1894,8 +1880,6 @@ _mesa_LockArraysEXT(GLint first, GLsizei count) ctx->Array.LockFirst = first; ctx->Array.LockCount = count; - - ctx->NewState |= _NEW_ARRAY; } @@ -1914,7 +1898,6 @@ _mesa_UnlockArraysEXT( void ) ctx->Array.LockFirst = 0; ctx->Array.LockCount = 0; - ctx->NewState |= _NEW_ARRAY; }