mesa: don't save gl_shared_state in glPushAttrib

glPushAttrib only saves values and names. It doesn't save objects.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181>
This commit is contained in:
Marek Olšák 2020-12-19 19:12:48 -05:00
parent 8706e97ffd
commit 5da8352225
2 changed files with 0 additions and 24 deletions

View file

@ -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]);
}

View file

@ -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;
};