summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program.h
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2006-12-14 13:56:58 -0700
committerBrian <brian@yutani.localnet.net>2006-12-14 13:56:58 -0700
commitb2a3a8554a114d93691d5350c234d2022c2c2916 (patch)
treee3c756a82457e972f07f171b02af55b37d072987 /src/mesa/shader/program.h
parente7e4181361cf2820761c654555f4751e49978a13 (diff)
New functions for cloning programs and parameter lists.
Diffstat (limited to 'src/mesa/shader/program.h')
-rw-r--r--src/mesa/shader/program.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h
index a3f50b93107..98e2b536021 100644
--- a/src/mesa/shader/program.h
+++ b/src/mesa/shader/program.h
@@ -121,6 +121,9 @@ extern struct prog_instruction *
_mesa_realloc_instructions(struct prog_instruction *oldInst,
GLuint numOldInst, GLuint numNewInst);
+extern struct gl_program *
+_mesa_clone_program(GLcontext *ctx, const struct gl_program *prog);
+
/**
* Used for describing GL state referenced from inside ARB vertex and
@@ -203,8 +206,9 @@ typedef enum gl_state_index_ {
*/
struct gl_program_parameter
{
- const char *Name; /**< Null-terminated string */
+ const char *Name; /**< Null-terminated string */
enum register_file Type; /**< PROGRAM_NAMED_PARAM, CONSTANT or STATE_VAR */
+ GLuint Size; /**< Number of components (1..4) */
/**
* A sequence of STATE_* tokens and integers to identify GL state.
*/
@@ -236,6 +240,14 @@ _mesa_new_parameter_list(void);
extern void
_mesa_free_parameter_list(struct gl_program_parameter_list *paramList);
+extern struct gl_program_parameter_list *
+_mesa_clone_parameter_list(const struct gl_program_parameter_list *list);
+
+extern GLint
+_mesa_add_parameter(struct gl_program_parameter_list *paramList,
+ const char *name, const GLfloat values[4], GLuint size,
+ enum register_file type);
+
extern GLint
_mesa_add_named_parameter(struct gl_program_parameter_list *paramList,
const char *name, const GLfloat values[4]);