mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
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>
This commit is contained in:
parent
d7a1f01db3
commit
f30aab7696
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue