diff options
author | Brian Paul <brianp@vmware.com> | 2010-02-14 19:09:04 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-02-14 21:57:14 -0700 |
commit | 848835a3d8889d716c05985b42fe740e9de81c15 (patch) | |
tree | 7efb5925aa4cee5bb9246240823eea8c5ad3ab07 /src/mesa | |
parent | 7851856a604bf379b34f5c1b1886e9dafa634cbd (diff) |
mesa: added _mesa_clone_vertex/fragment_program()
To reduce casting elsewhere...
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/program.h | 16 |
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); |