From: Alyssa Rosenzweig Date: Tue, 18 May 2021 14:29:00 +0000 (-0400) Subject: panfrost: Mark job_index > 10000 as unlikely X-Git-Tag: upstream/21.2.3~3237 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a9a3f55519bf7ecf19f7b2d45c4a1bbcb6e42e4e;p=platform%2Fupstream%2Fmesa.git panfrost: Mark job_index > 10000 as unlikely By definition this is happening <= 0.02% of the time. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 43a3c5f..78e5a32 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -694,7 +694,7 @@ panfrost_draw_vbo(struct pipe_context *pipe, /* Don't add too many jobs to a single batch. Hardware has a hard limit * of 65536 jobs, but we choose a smaller soft limit (arbitrary) to * avoid the risk of timeouts. This might not be a good idea. */ - if (batch->scoreboard.job_index > 10000) + if (unlikely(batch->scoreboard.job_index > 10000)) batch = panfrost_get_fresh_batch_for_fbo(ctx); unsigned zs_draws = ctx->depth_stencil->draws;