Same as with resource mappings the blit can target a resource that may be
cached in the texture cache. Mark the cache as dirty to make sure it is
invalidated before the next draw.
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>
struct etna_context *ctx = etna_context(pctx);
struct pipe_blit_info info = *blit_info;
+
if (ctx->blit(pctx, &info))
- return;
+ goto success;
if (util_try_blit_via_copy_region(pctx, &info, false))
- return;
+ goto success;
if (info.mask & PIPE_MASK_S) {
DBG("cannot blit stencil, skipping");
etna_blit_save_state(ctx);
util_blitter_blit(ctx->blitter, &info);
+
+success:
+ if (info.dst.resource->bind & PIPE_BIND_SAMPLER_VIEW)
+ ctx->dirty |= ETNA_DIRTY_TEXTURE_CACHES;
}
static void