summaryrefslogtreecommitdiff
path: root/src/mesa/shader/shader_api.h
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-04-12 15:22:32 -0600
committerBrian <brian@yutani.localnet.net>2007-04-12 15:22:32 -0600
commit3c008a014f7c1d14209b70b4b030bf7738aa16d7 (patch)
tree25202afc36e22614666ea8e6895a6e551209afb6 /src/mesa/shader/shader_api.h
parentbf287356cfc806f9df862a05620f046f8980a8e7 (diff)
New _mesa_reference_shader/program() function to consolidate refcounting.
Note that (unlike texture objects), shader handles remain valid (in the hash table) after glDeleteShader/Program() if the refcount isn't zero.
Diffstat (limited to 'src/mesa/shader/shader_api.h')
-rw-r--r--src/mesa/shader/shader_api.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/shader/shader_api.h b/src/mesa/shader/shader_api.h
index 16ed1a0c10..27e5870d70 100644
--- a/src/mesa/shader/shader_api.h
+++ b/src/mesa/shader/shader_api.h
@@ -45,12 +45,21 @@ extern struct gl_shader_program *
_mesa_new_shader_program(GLcontext *ctx, GLuint name);
extern void
+_mesa_clear_shader_program_data(GLcontext *ctx,
+ struct gl_shader_program *shProg);
+
+extern void
_mesa_free_shader_program_data(GLcontext *ctx,
struct gl_shader_program *shProg);
extern void
_mesa_free_shader_program(GLcontext *ctx, struct gl_shader_program *shProg);
+extern void
+_mesa_reference_shader_program(GLcontext *ctx,
+ struct gl_shader_program **ptr,
+ struct gl_shader_program *shProg);
+
extern struct gl_shader_program *
_mesa_lookup_shader_program(GLcontext *ctx, GLuint name);
@@ -61,6 +70,10 @@ _mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type);
extern void
_mesa_free_shader(GLcontext *ctx, struct gl_shader *sh);
+extern void
+_mesa_reference_shader(GLcontext *ctx, struct gl_shader **ptr,
+ struct gl_shader *sh);
+
extern struct gl_shader *
_mesa_lookup_shader(GLcontext *ctx, GLuint name);