[Mesa-dev] [PATCH 05/23] mesa: remove Driver.DeleteShaderProgram

Marek Olšák maraeo at gmail.com
Sun Sep 27 15:20:34 PDT 2015


From: Marek Olšák <marek.olsak at amd.com>

Nothing overrides it.
---
 src/mesa/main/dd.h        | 2 --
 src/mesa/main/shaderobj.c | 9 ++++-----
 src/mesa/main/shaderobj.h | 3 +++
 src/mesa/main/shared.c    | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 64f2a34..c35c7aa 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -783,8 +783,6 @@ struct dd_function_table {
     * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
     */
    /*@{*/
-   void (*DeleteShaderProgram)(struct gl_context *ctx,
-                               struct gl_shader_program *shProg);
    void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg);
    /*@}*/
 
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index 67120c5..efdaeef 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -208,7 +208,7 @@ _mesa_reference_shader_program_(struct gl_context *ctx,
       if (deleteFlag) {
 	 if (old->Name != 0)
 	    _mesa_HashRemove(ctx->Shared->ShaderObjects, old->Name);
-         ctx->Driver.DeleteShaderProgram(ctx, old);
+         _mesa_delete_shader_program(ctx, old);
       }
 
       *ptr = NULL;
@@ -371,10 +371,10 @@ _mesa_free_shader_program_data(struct gl_context *ctx,
 
 /**
  * Free/delete a shader program object.
- * Called via ctx->Driver.DeleteShaderProgram().
  */
-static void
-_mesa_delete_shader_program(struct gl_context *ctx, struct gl_shader_program *shProg)
+void
+_mesa_delete_shader_program(struct gl_context *ctx,
+                            struct gl_shader_program *shProg)
 {
    _mesa_free_shader_program_data(ctx, shProg);
 
@@ -435,6 +435,5 @@ _mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name,
 void
 _mesa_init_shader_object_functions(struct dd_function_table *driver)
 {
-   driver->DeleteShaderProgram = _mesa_delete_shader_program;
    driver->LinkShader = _mesa_ir_link_shader;
 }
diff --git a/src/mesa/main/shaderobj.h b/src/mesa/main/shaderobj.h
index f40c7fc..796de47 100644
--- a/src/mesa/main/shaderobj.h
+++ b/src/mesa/main/shaderobj.h
@@ -102,6 +102,9 @@ extern void
 _mesa_free_shader_program_data(struct gl_context *ctx,
                                struct gl_shader_program *shProg);
 
+extern void
+_mesa_delete_shader_program(struct gl_context *ctx,
+                            struct gl_shader_program *shProg);
 
 
 extern void
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index 7ab89d0..1acaf59 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -224,7 +224,7 @@ delete_shader_cb(GLuint id, void *data, void *userData)
    else {
       struct gl_shader_program *shProg = (struct gl_shader_program *) data;
       assert(shProg->Type == GL_SHADER_PROGRAM_MESA);
-      ctx->Driver.DeleteShaderProgram(ctx, shProg);
+      _mesa_delete_shader_program(ctx, shProg);
    }
 }
 
-- 
2.1.4



More information about the mesa-dev mailing list