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