From e83c01919f0ec8e2357c73ba7818e3c5964788f7 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Wed, 16 Nov 2022 17:15:07 +0100 Subject: [PATCH] etnaviv: remove use of flush_seqno as trigger for texture cache invalidate The flush_seqno is only to be used/updated when a dirty tile status has been written back to the resource. Using it as a marker to trigger a texture cache invalidation is bogus and not actually needed. When the texture resource is updated via a mapping or blit the texture cache invalidation is already triggered by marking the caches as dirty. If the resource is updated by fragment output, OpenGL explicitly defines the result of a later texture read as undefined unless a TextureBarrier is inserted, which also properly triggers the texture cache invalidate. Also the current check is bogus as it doesn't handle seqno wraparound. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/drivers/etnaviv/etnaviv_texture.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture.c b/src/gallium/drivers/etnaviv/etnaviv_texture.c index e5857f3..73144bd 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_texture.c +++ b/src/gallium/drivers/etnaviv/etnaviv_texture.c @@ -186,10 +186,8 @@ etna_update_sampler_source(struct pipe_sampler_view *view, int num) to->flush_seqno = from->seqno; ctx->dirty |= ETNA_DIRTY_TEXTURE_CACHES; } - } else if ((to == from) && (to->flush_seqno < from->seqno)) { - to->flush_seqno = from->seqno; - ctx->dirty |= ETNA_DIRTY_TEXTURE_CACHES; } + if (etna_configure_sampler_ts(ctx->ts_for_sampler_view(view), view, enable_sampler_ts)) { ctx->dirty |= ETNA_DIRTY_SAMPLER_VIEWS | ETNA_DIRTY_TEXTURE_CACHES; ctx->dirty_sampler_views |= (1 << num); -- 2.7.4