mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 06:20:19 +01:00
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 <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:
parent
215613ba35
commit
2f86639ea3
1 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue