mesa: remove Driver.DeleteShaderProgram
authorMarek Olšák <marek.olsak@amd.com>
Sun, 27 Sep 2015 19:28:22 +0000 (21:28 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 3 Oct 2015 20:06:08 +0000 (22:06 +0200)
Nothing overrides it.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/dd.h
src/mesa/main/shaderobj.c
src/mesa/main/shaderobj.h
src/mesa/main/shared.c

index 56cfda7091cb4ff2526d5185cb44eb38168b2d46..6873205375ac85efdc18db7ed79ee9603cbe0856 100644 (file)
@@ -785,8 +785,6 @@ struct dd_function_table {
    /*@{*/
    struct gl_shader *(*NewShader)(struct gl_context *ctx,
                                   GLuint name, GLenum type);
-   void (*DeleteShaderProgram)(struct gl_context *ctx,
-                               struct gl_shader_program *shProg);
    void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg);
    /*@}*/
 
index 0b85f74bf42980f69146165993c701d7c01d8d5c..4e85fda24b40e60d1373fe24c7ed9cac613ee0b6 100644 (file)
@@ -209,7 +209,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;
@@ -372,10 +372,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);
 
@@ -437,6 +437,5 @@ void
 _mesa_init_shader_object_functions(struct dd_function_table *driver)
 {
    driver->NewShader = _mesa_new_shader;
-   driver->DeleteShaderProgram = _mesa_delete_shader_program;
    driver->LinkShader = _mesa_ir_link_shader;
 }
index f40c7fcc5e6ed2d69f2b7d0cbdfd0d4d448d657c..796de47073550160e769f3064856b2426004a153 100644 (file)
@@ -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
index 7ab89d08584255d96da4520d399c932403c719c9..1acaf59f432aef0d745b338b842ecd5e379f097a 100644 (file)
@@ -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);
    }
 }