mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 04:30:10 +01:00
panfrost: Bail out early when new and current FB states are equal
If the current FB matches the new one there's nothing to be done in panfrost_set_framebuffer_state(). By bailing out early in that case we avoid emitting new FB descriptors (the old ones are still valid). Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
17d6ee2bd1
commit
8645afce4c
1 changed files with 4 additions and 0 deletions
|
|
@ -2365,6 +2365,10 @@ panfrost_set_framebuffer_state(struct pipe_context *pctx,
|
|||
bool is_scanout = panfrost_is_scanout(ctx);
|
||||
bool has_draws = job->last_job.gpu;
|
||||
|
||||
/* Bail out early when the current and new states are the same. */
|
||||
if (util_framebuffer_state_equal(&ctx->pipe_framebuffer, fb))
|
||||
return;
|
||||
|
||||
if (!ctx->wallpaper_batch && (!is_scanout || has_draws)) {
|
||||
panfrost_flush(pctx, NULL, PIPE_FLUSH_END_OF_FRAME);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue