Mesa (master): etnaviv: don't flush resource to self without TS
Lucas Stach
lynxeye at kemper.freedesktop.org
Thu Jun 8 16:30:14 UTC 2017
Module: Mesa
Branch: master
Commit: f25390afa49f51fadaafed70a890093f96e7a02d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f25390afa49f51fadaafed70a890093f96e7a02d
Author: Lucas Stach <dev at lynxeye.de>
Date: Sun Jun 4 06:24:20 2017 +0200
etnaviv: don't flush resource to self without TS
A resolve to self is only necessary if the resource is fast cleared, so
there is never a need to do so if there is no TS allocated.
Signed-off-by: Lucas Stach <dev at lynxeye.de>
Reviewed-by: Wladimir J. van der Laan <laanwj at gmail.com>
---
src/gallium/drivers/etnaviv/etnaviv_resource.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.h b/src/gallium/drivers/etnaviv/etnaviv_resource.h
index 913316f193..3507e5ccec 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_resource.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_resource.h
@@ -102,7 +102,7 @@ etna_resource_older(struct etna_resource *a, struct etna_resource *b)
static inline bool
etna_resource_needs_flush(struct etna_resource *res)
{
- return (int)(res->seqno - res->flush_seqno) > 0;
+ return res->ts_bo && ((int)(res->seqno - res->flush_seqno) > 0);
}
/* is the resource only used on the sampler? */
More information about the mesa-commit
mailing list