summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2017-04-12 16:13:36 +0200
committerChristian Gmeiner <christian.gmeiner@gmail.com>2017-04-15 00:15:27 +0200
commitf30aab76961564e2f0ce34af7d7b38ec43535877 (patch)
tree89daf2ffff1672d8fb67e5ac3e68035b59c2570d /src/gallium/drivers
parentd7a1f01db36f32f8fbf47535d3969bcb57dae91d (diff)
etnaviv: stop repeatedly resolving an unchanged resource into its scanout prime buffer
Before resolving a resource into its scanout prime buffer, check that the prime resource is actually older. If it is not, the resolve is an expensive no-op, and we better skip it. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_clear_blit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
index d555884d3fe..a089fed13ce 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
@@ -593,8 +593,11 @@ etna_flush_resource(struct pipe_context *pctx, struct pipe_resource *prsc)
{
struct etna_resource *rsc = etna_resource(prsc);
- if (rsc->scanout)
+ if (rsc->scanout &&
+ etna_resource_older(etna_resource(rsc->scanout->prime), rsc)) {
etna_copy_resource(pctx, rsc->scanout->prime, prsc, 0, 0);
+ etna_resource(rsc->scanout->prime)->seqno = rsc->seqno;
+ }
}
void