On 04/03/2014 08:20 AM, [email protected] wrote:
From: José Fonseca <[email protected]>When testing with llvmpipe, somehow the draw() function is returning constant elapsed time of 0.000222 approximately, regardless how big iters is. This is probably a bug in llvmpipe, but it seems a good idea to fix the test to prevent integer overflow and the consequent infinite loop in the test regardless. --- tests/spec/ext_timer_query/time-elapsed.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/spec/ext_timer_query/time-elapsed.c b/tests/spec/ext_timer_query/time-elapsed.c index e0da672..64c2d67 100644 --- a/tests/spec/ext_timer_query/time-elapsed.c +++ b/tests/spec/ext_timer_query/time-elapsed.c @@ -213,6 +213,10 @@ retry: for (iters = 1; ; iters *= 2) { if (draw(q, iters) > 0.1) break; + if (iters * 2 <= iters) { + printf("Couldn't find appropriate number of iterations\n"); + piglit_report_result(PIGLIT_FAIL); + } } /* Now, do several runs like this so we can determine if the
Reviewed-by: Brian Paul <[email protected]> _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
