From 2f86639ea302d9342fd3f57857d71dff8f71e011 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Wed, 16 Nov 2022 17:27:38 +0100 Subject: [PATCH] etnaviv: mark texture caches as dirty when blitting into a sampler resource 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 Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c index 7a6591e..00ff211 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c +++ b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c @@ -97,11 +97,12 @@ etna_blit(struct pipe_context *pctx, const struct pipe_blit_info *blit_info) 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"); @@ -117,6 +118,10 @@ etna_blit(struct pipe_context *pctx, const struct pipe_blit_info *blit_info) 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 -- 2.7.4