summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-02-14 19:09:04 -0700
committerBrian Paul <brianp@vmware.com>2010-02-14 21:57:14 -0700
commit848835a3d8889d716c05985b42fe740e9de81c15 (patch)
tree7efb5925aa4cee5bb9246240823eea8c5ad3ab07
parent7851856a604bf379b34f5c1b1886e9dafa634cbd (diff)
mesa: added _mesa_clone_vertex/fragment_program()
To reduce casting elsewhere...
-rw-r--r--src/mesa/shader/program.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h
index 0187a2c55f..af9f4170d1 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);