diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 82f7ed6ed10..0229bb30689 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -275,10 +275,6 @@ _mesa_PushAttrib(GLbitfield mask) copy_texture_attribs(dst, src, tex); } } - - head->Texture.SharedRef = NULL; - _mesa_reference_shared_state(ctx, &head->Texture.SharedRef, ctx->Shared); - _mesa_unlock_context_textures(ctx); } @@ -645,9 +641,6 @@ pop_texture_group(struct gl_context *ctx, struct gl_texture_attrib_node *texstat } _mesa_ActiveTexture(GL_TEXTURE0_ARB + texstate->CurrentUnit); - - _mesa_reference_shared_state(ctx, &texstate->SharedRef, NULL); - _mesa_unlock_context_textures(ctx); } @@ -1555,16 +1548,6 @@ _mesa_PushClientAttribDefaultEXT( GLbitfield mask ) void _mesa_free_attrib_data(struct gl_context *ctx) { - while (ctx->AttribStackDepth > 0) { - struct gl_attrib_node *attr; - - ctx->AttribStackDepth--; - attr = ctx->AttribStack[ctx->AttribStackDepth]; - - if (attr->Mask & GL_TEXTURE_BIT) - _mesa_reference_shared_state(ctx, &attr->Texture.SharedRef, NULL); - } - for (unsigned i = 0; i < ARRAY_SIZE(ctx->AttribStack); i++) free(ctx->AttribStack[i]); } diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index fc596dba496..2f04de3e79e 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -5057,13 +5057,6 @@ struct gl_texture_attrib_node * SavedObj[][].Target is unused, so the value is invalid. */ struct gl_texture_object SavedObj[MAX_TEXTURE_UNITS][NUM_TEXTURE_TARGETS]; - - /* We need to keep a reference to the shared state. That's where the - * default texture objects are kept. We don't want that state to be - * freed while the attribute stack contains pointers to any default - * texture objects. - */ - struct gl_shared_state *SharedRef; };