mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-15 11:40:39 +01:00
minor clean-ups in _mesa_execute_program()
This commit is contained in:
parent
8b34b7da41
commit
cfd0011f2f
1 changed files with 4 additions and 5 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue