panfrost: Warn on get_fresh_batch_for_fbo
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830>
This commit is contained in:
parent
a266a0fbbb
commit
f2e3ac5c62
|
@ -3092,7 +3092,7 @@ panfrost_draw_vbo(struct pipe_context *pipe,
|
|||
* 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;
|
||||
|
|
|
@ -73,7 +73,7 @@ panfrost_clear(
|
|||
* 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ 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)
|
||||
{
|
||||
struct panfrost_batch *batch;
|
||||
|
||||
|
@ -250,6 +250,7 @@ panfrost_get_fresh_batch_for_fbo(struct panfrost_context *ctx)
|
|||
/* 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;
|
||||
|
|
|
@ -144,7 +144,7 @@ struct panfrost_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,
|
||||
|
|
Loading…
Reference in New Issue