diff options
Diffstat (limited to 'src/mesa/shader/program.h')
-rw-r--r-- | src/mesa/shader/program.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h index ea2c8c30508..9a6883e6a55 100644 --- a/src/mesa/shader/program.h +++ b/src/mesa/shader/program.h @@ -86,6 +86,28 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog); extern struct gl_program * _mesa_lookup_program(GLcontext *ctx, GLuint id); +extern void +_mesa_reference_program(GLcontext *ctx, + struct gl_program **ptr, + struct gl_program *prog); + +static INLINE void +_mesa_reference_vertprog(GLcontext *ctx, + struct gl_vertex_program **ptr, + struct gl_vertex_program *prog) +{ + _mesa_reference_program(ctx, (struct gl_program **) ptr, + (struct gl_program *) prog); +} + +static INLINE void +_mesa_reference_fragprog(GLcontext *ctx, + struct gl_fragment_program **ptr, + struct gl_fragment_program *prog) +{ + _mesa_reference_program(ctx, (struct gl_program **) ptr, + (struct gl_program *) prog); +} extern struct gl_program * _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog); |