From: Eric Anholt Date: Thu, 22 Jul 2010 19:16:11 +0000 (-0700) Subject: mesa: Only complain about an infinite loop in a swrast program once. X-Git-Tag: 062012170305~10660^2~312 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc15ef07e03e465d93df7062a516f9b4bfbaeda0;p=profile%2Fivi%2Fmesa.git mesa: Only complain about an infinite loop in a swrast program once. Chances are, if one fragment looped badly, others will too, and debugging output gets overwhelmed by the looping complaints. --- diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index f85c651..b6da344 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -1788,7 +1788,11 @@ _mesa_execute_program(GLcontext * ctx, numExec++; if (numExec > maxExec) { - _mesa_problem(ctx, "Infinite loop detected in fragment program"); + static GLboolean reported = GL_FALSE; + if (!reported) { + _mesa_problem(ctx, "Infinite loop detected in fragment program"); + reported = GL_TRUE; + } return GL_TRUE; }