/**
- * Add a new unnamed constant to the parameter list.
+ * Add a new named constant to the parameter list.
+ * This will be used when the program contains something like this:
+ * PARAM myVals = { 0, 1, 2, 3 };
+ *
* \param paramList - the parameter list
* \param values - four float values
* \return index of the new parameter.
/**
* Add a new unnamed constant to the parameter list.
+ * This will be used when the program contains something like this:
+ * MOV r, { 0, 1, 2, 3 };
+ *
* \param paramList - the parameter list
* \param values - four float values
* \return index of the new parameter.
/**
* Add a new state reference to the parameter list.
+ * This will be used when the program contains something like this:
+ * PARAM ambient = state.material.front.ambient;
+ *
* \param paramList - the parameter list
* \param state - an array of 6 state tokens
- *
* \return index of the new parameter.
*/
GLint
/**
+ * Reallocate memory storing an array of program instructions.
+ * This is used when we need to append additional instructions onto an
+ * program.
+ * \param oldInst pointer to first of old/src instructions
+ * \param numOldInst number of instructions at <oldInst>
+ * \param numNewInst desired size of new instruction array.
+ * \return pointer to start of new instruction array.
+ */
+struct prog_instruction *
+_mesa_realloc_instructions(struct prog_instruction *oldInst,
+ GLuint numOldInst, GLuint numNewInst)
+{
+ struct prog_instruction *newInst;
+
+ newInst = (struct prog_instruction *)
+ _mesa_realloc(oldInst,
+ numOldInst * sizeof(struct prog_instruction),
+ numNewInst * sizeof(struct prog_instruction));
+
+ return newInst;
+}
+
+
+/**
* Basic info about each instruction
*/
struct instruction_info
extern struct gl_program *
_mesa_lookup_program(GLcontext *ctx, GLuint id);
+extern struct prog_instruction *
+_mesa_realloc_instructions(struct prog_instruction *oldInst,
+ GLuint numOldInst, GLuint numNewInst);
+
/**
* Used for describing GL state referenced from inside ARB vertex and