/*@{*/
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);
/*@}*/
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;
/**
* 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);
_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;
}
_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
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);
}
}