summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/dd.h1
-rw-r--r--src/mesa/main/shaderobj.c8
-rw-r--r--src/mesa/main/shaderobj.h3
-rw-r--r--src/mesa/main/shared.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 88f37273e1e..a1cdfedd04f 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -785,7 +785,6 @@ struct dd_function_table {
/*@{*/
struct gl_shader *(*NewShader)(struct gl_context *ctx,
GLuint name, GLenum type);
- void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader);
struct gl_shader_program *(*NewShaderProgram)(GLuint name);
void (*DeleteShaderProgram)(struct gl_context *ctx,
struct gl_shader_program *shProg);
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index 5cd37d7e4c4..90600fffc4b 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -74,7 +74,7 @@ _mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
if (deleteFlag) {
if (old->Name != 0)
_mesa_HashRemove(ctx->Shared->ShaderObjects, old->Name);
- ctx->Driver.DeleteShader(ctx, old);
+ _mesa_delete_shader(ctx, old);
}
*ptr = NULL;
@@ -116,9 +116,8 @@ _mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type)
/**
* Delete a shader object.
- * Called via ctx->Driver.DeleteShader().
*/
-static void
+void
_mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh)
{
free((void *)sh->Source);
@@ -362,7 +361,7 @@ _mesa_free_shader_program_data(struct gl_context *ctx,
for (sh = 0; sh < MESA_SHADER_STAGES; sh++) {
if (shProg->_LinkedShaders[sh] != NULL) {
- ctx->Driver.DeleteShader(ctx, shProg->_LinkedShaders[sh]);
+ _mesa_delete_shader(ctx, shProg->_LinkedShaders[sh]);
shProg->_LinkedShaders[sh] = NULL;
}
}
@@ -439,7 +438,6 @@ void
_mesa_init_shader_object_functions(struct dd_function_table *driver)
{
driver->NewShader = _mesa_new_shader;
- driver->DeleteShader = _mesa_delete_shader;
driver->NewShaderProgram = _mesa_new_shader_program;
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 943044e37cd..8add6425a9a 100644
--- a/src/mesa/main/shaderobj.h
+++ b/src/mesa/main/shaderobj.h
@@ -82,6 +82,9 @@ _mesa_init_shader(struct gl_context *ctx, struct gl_shader *shader);
extern struct gl_shader *
_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type);
+extern void
+_mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh);
+
extern struct gl_shader_program *
_mesa_lookup_shader_program(struct gl_context *ctx, GLuint name);
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index d5ac9f1fb13..7ab89d08584 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -219,7 +219,7 @@ delete_shader_cb(GLuint id, void *data, void *userData)
struct gl_context *ctx = (struct gl_context *) userData;
struct gl_shader *sh = (struct gl_shader *) data;
if (_mesa_validate_shader_target(ctx, sh->Type)) {
- ctx->Driver.DeleteShader(ctx, sh);
+ _mesa_delete_shader(ctx, sh);
}
else {
struct gl_shader_program *shProg = (struct gl_shader_program *) data;