diff options
author | Brian <[email protected]> | 2007-04-12 15:22:32 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-04-12 15:22:32 -0600 |
commit | 3c008a014f7c1d14209b70b4b030bf7738aa16d7 (patch) | |
tree | 25202afc36e22614666ea8e6895a6e551209afb6 /src/mesa/shader/shader_api.h | |
parent | bf287356cfc806f9df862a05620f046f8980a8e7 (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.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/shader/shader_api.h b/src/mesa/shader/shader_api.h index 16ed1a0c108..27e5870d705 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); |