[Mesa-dev] [PATCH 2/2] mesa: remove free_shader_program_data_cb
Timothy Arceri
timothy.arceri at collabora.com
Sun Nov 6 21:45:37 UTC 2016
We no longer need this as it was just working around a locking issue
that has been fixed by switching to using recursive locking in the
hash table.
We can now just let delete_shader_cb() free the shader program data.
---
src/mesa/main/shared.c | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index 04e5443..5e6c558 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -210,22 +210,6 @@ delete_bufferobj_cb(GLuint id, void *data, void *userData)
/**
- * Callback for freeing shader program data. Call it before delete_shader_cb
- * to avoid memory access error.
- */
-static void
-free_shader_program_data_cb(GLuint id, void *data, void *userData)
-{
- struct gl_context *ctx = (struct gl_context *) userData;
- struct gl_shader_program *shProg = (struct gl_shader_program *) data;
-
- if (shProg->Type == GL_SHADER_PROGRAM_MESA) {
- _mesa_free_shader_program_data(ctx, shProg);
- }
-}
-
-
-/**
* Callback for deleting shader and shader programs objects.
* Called by _mesa_HashDeleteAll().
*/
@@ -323,7 +307,6 @@ free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared)
_mesa_HashDeleteAll(shared->BitmapAtlas, delete_bitmap_atlas_cb, ctx);
_mesa_DeleteHashTable(shared->BitmapAtlas);
- _mesa_HashWalk(shared->ShaderObjects, free_shader_program_data_cb, ctx);
_mesa_HashDeleteAll(shared->ShaderObjects, delete_shader_cb, ctx);
_mesa_DeleteHashTable(shared->ShaderObjects);
--
2.7.4
More information about the mesa-dev
mailing list