Module: Mesa Branch: main Commit: 27ac55873a1cce5584a61992600382aa0acba97f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=27ac55873a1cce5584a61992600382aa0acba97f
Author: Lucas Stach <[email protected]> Date: Mon Oct 16 20:07:42 2023 +0200 etnaviv: only add shared resources to implicit flush list The implicit flushing is only required if the resource is shared and changes to the resource must be visible outside of the screen after the flush. For non-shared resources we can rely on the screen internal tracking of data updates. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25756> --- src/gallium/drivers/etnaviv/etnaviv_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_state.c b/src/gallium/drivers/etnaviv/etnaviv_state.c index c7619a512b0..a50071d1ae0 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_state.c +++ b/src/gallium/drivers/etnaviv/etnaviv_state.c @@ -802,8 +802,9 @@ etna_record_flush_resources(struct etna_context *ctx) if (fb->nr_cbufs > 0) { struct etna_surface *surf = etna_surface(fb->cbufs[0]); + struct etna_resource *rsc = etna_resource(surf->prsc); - if (!etna_resource(surf->prsc)->explicit_flush) + if (rsc->shared && !rsc->explicit_flush) etna_context_add_flush_resource(ctx, surf->prsc); }
