summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-02-25 18:30:45 -0700
committerBrian <[email protected]>2007-02-25 18:30:45 -0700
commitcfd0011f2fe3aad2ea0f66c151b3fb12d05f644e (patch)
tree286ba3e265012a836af22f34a4b89807fb3785d0 /src/mesa
parent8b34b7da4131d2b07037ce062c522fddd614f127 (diff)
minor clean-ups in _mesa_execute_program()
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/shader/prog_execute.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c
index b3d017bd9bb..1b7ed4c5d0e 100644
--- a/src/mesa/shader/prog_execute.c
+++ b/src/mesa/shader/prog_execute.c
@@ -643,8 +643,8 @@ _mesa_execute_program(GLcontext * ctx,
struct gl_program_machine *machine)
{
const GLuint numInst = program->NumInstructions;
- const GLuint MAX_EXEC = 10000;
- GLint pc, total = 0;
+ const GLuint maxExec = 10000;
+ GLint pc, numExec = 0;
machine->CurProgram = program;
@@ -1666,11 +1666,10 @@ _mesa_execute_program(GLcontext * ctx,
}
- total++;
- if (total > MAX_EXEC) {
+ numExec++;
+ if (numExec > maxExec) {
_mesa_problem(ctx, "Infinite loop detected in fragment program");
return GL_TRUE;
- abort();
}
} /* for pc */