remove 'maxInst' parameter from _mesa_execute_program()
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c
index 0982e3e..b3d017b 100644
--- a/src/mesa/shader/prog_execute.c
+++ b/src/mesa/shader/prog_execute.c
@@ -635,14 +635,14 @@
  * \param ctx - rendering context
  * \param program - the fragment program to execute
  * \param machine - machine state (register file)
- * \param maxInst - max number of instructions to execute
  * \return GL_TRUE if program completed or GL_FALSE if program executed KIL.
  */
 GLboolean
 _mesa_execute_program(GLcontext * ctx,
-                      const struct gl_program *program, GLuint maxInst,
+                      const struct gl_program *program,
                       struct gl_program_machine *machine)
 {
+   const GLuint numInst = program->NumInstructions;
    const GLuint MAX_EXEC = 10000;
    GLint pc, total = 0;
 
@@ -656,7 +656,7 @@
    CurrentMachine = machine;
 #endif
 
-   for (pc = 0; pc < maxInst; pc++) {
+   for (pc = 0; pc < numInst; pc++) {
       const struct prog_instruction *inst = program->Instructions + pc;
 
 #if FEATURE_MESA_program_debug