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 <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19800>
This commit is contained in:
Lucas Stach 2022-11-16 17:15:07 +01:00 committed by Marge Bot
parent 2f86639ea3
commit e83c01919f

View file

@ -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);