New functions for cloning programs and parameter lists.
diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h
index a3f50b9..98e2b53 100644
--- a/src/mesa/shader/program.h
+++ b/src/mesa/shader/program.h
@@ -121,6 +121,9 @@
 _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 @@
  */
 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 @@
 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]);