* 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 (unlikely(batch->scoreboard.job_index > 10000))
- batch = panfrost_get_fresh_batch_for_fbo(ctx);
+ batch = panfrost_get_fresh_batch_for_fbo(ctx, "Too many draws");
unsigned zs_draws = ctx->depth_stencil->draws;
batch->draws |= zs_draws;
* color/depth/stencil value, thus avoiding the generation of extra
* fragment jobs.
*/
- struct panfrost_batch *batch = panfrost_get_fresh_batch_for_fbo(ctx);
+ struct panfrost_batch *batch = panfrost_get_fresh_batch_for_fbo(ctx, "Clear");
panfrost_batch_clear(batch, buffers, color, depth, stencil);
}
}
struct panfrost_batch *
-panfrost_get_fresh_batch_for_fbo(struct panfrost_context *ctx)
+panfrost_get_fresh_batch_for_fbo(struct panfrost_context *ctx, const char *reason)
{
struct panfrost_batch *batch;
/* Otherwise, we need to freeze the existing one and instantiate a new
* one.
*/
+ perf_debug_ctx(ctx, "Flushing the current FBO due to: %s", reason);
panfrost_batch_submit(batch, 0, 0);
batch = panfrost_get_batch(ctx, &ctx->pipe_framebuffer);
ctx->batch = batch;
panfrost_get_batch_for_fbo(struct panfrost_context *ctx);
struct panfrost_batch *
-panfrost_get_fresh_batch_for_fbo(struct panfrost_context *ctx);
+panfrost_get_fresh_batch_for_fbo(struct panfrost_context *ctx, const char *reason);
void
panfrost_batch_add_bo(struct panfrost_batch *batch,