diff options
author | Brian <brian@nostromo.localnet.net> | 2007-02-25 18:26:50 -0700 |
---|---|---|
committer | Brian <brian@nostromo.localnet.net> | 2007-02-25 18:26:50 -0700 |
commit | 8b34b7da4131d2b07037ce062c522fddd614f127 (patch) | |
tree | 4b618dc29b26767008b68b1b1a33e0b0b29e1836 /src/mesa/shader | |
parent | 085d7d59f0e167bb546c4a1675e09631b14fc9f7 (diff) | |
download | external_mesa3d-8b34b7da4131d2b07037ce062c522fddd614f127.zip external_mesa3d-8b34b7da4131d2b07037ce062c522fddd614f127.tar.gz external_mesa3d-8b34b7da4131d2b07037ce062c522fddd614f127.tar.bz2 |
remove 'maxInst' parameter from _mesa_execute_program()
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/prog_execute.c | 6 | ||||
-rw-r--r-- | src/mesa/shader/prog_execute.h | 2 |
2 files changed, 4 insertions, 4 deletions
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 @@ init_machine_deriv(GLcontext * ctx, * \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 @@ _mesa_execute_program(GLcontext * ctx, 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 diff --git a/src/mesa/shader/prog_execute.h b/src/mesa/shader/prog_execute.h index feda65f..2dbd922 100644 --- a/src/mesa/shader/prog_execute.h +++ b/src/mesa/shader/prog_execute.h @@ -74,7 +74,7 @@ _mesa_get_program_register(GLcontext *ctx, enum register_file file, extern GLboolean _mesa_execute_program(GLcontext *ctx, - const struct gl_program *program, GLuint maxInst, + const struct gl_program *program, struct gl_program_machine *machine); |