From: Brian Paul Date: Mon, 15 Feb 2010 02:09:04 +0000 (-0700) Subject: mesa: added _mesa_clone_vertex/fragment_program() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=848835a3d8889d716c05985b42fe740e9de81c15;p=mesa.git mesa: added _mesa_clone_vertex/fragment_program() To reduce casting elsewhere... --- diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h index 0187a2c55ff..af9f4170d1b 100644 --- a/src/mesa/shader/program.h +++ b/src/mesa/shader/program.h @@ -108,6 +108,22 @@ _mesa_reference_fragprog(GLcontext *ctx, extern struct gl_program * _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog); +static INLINE struct gl_vertex_program * +_mesa_clone_vertex_program(GLcontext *ctx, + const struct gl_vertex_program *prog) +{ + return (struct gl_vertex_program *) _mesa_clone_program(ctx, &prog->Base); +} + + +static INLINE struct gl_fragment_program * +_mesa_clone_fragment_program(GLcontext *ctx, + const struct gl_fragment_program *prog) +{ + return (struct gl_fragment_program *) _mesa_clone_program(ctx, &prog->Base); +} + + extern GLboolean _mesa_insert_instructions(struct gl_program *prog, GLuint start, GLuint count);