From 848835a3d8889d716c05985b42fe740e9de81c15 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 14 Feb 2010 19:09:04 -0700 Subject: [PATCH] mesa: added _mesa_clone_vertex/fragment_program() To reduce casting elsewhere... --- src/mesa/shader/program.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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); -- 2.30.2