mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-22 03:10:41 +02:00
etnaviv: optimize transfer flushes
Context flushes that are triggered by a pending write to the resource don't need to realize visibility of the resource changes outside of the context. Skip implicit resource flushes in those cases. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23549>
This commit is contained in:
parent
64fda091de
commit
a603413eb8
4 changed files with 7 additions and 3 deletions
|
|
@ -506,7 +506,7 @@ etna_reset_gpu_state(struct etna_context *ctx)
|
|||
ctx->dirty_sampler_views = ~0L;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
etna_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags, bool internal)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -220,4 +220,8 @@ void
|
|||
etna_context_add_flush_resource(struct etna_context *ctx,
|
||||
struct pipe_resource *rsc);
|
||||
|
||||
void
|
||||
etna_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags, bool internal);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -822,7 +822,7 @@ manual:
|
|||
if (src->layout == ETNA_LAYOUT_TILED && dst->layout == ETNA_LAYOUT_TILED) {
|
||||
if ((etna_resource_status(ctx, src) & ETNA_PENDING_WRITE) ||
|
||||
(etna_resource_status(ctx, dst) & ETNA_PENDING_WRITE))
|
||||
pctx->flush(pctx, NULL, 0);
|
||||
etna_flush(pctx, NULL, 0, true);
|
||||
return etna_manual_blit(dst, dst_lev, dst_offset, src, src_lev, src_offset, blit_info);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ etna_transfer_map(struct pipe_context *pctx, struct pipe_resource *prsc,
|
|||
(!trans->rsc &&
|
||||
(((usage & PIPE_MAP_READ) && (status & ETNA_PENDING_WRITE)) ||
|
||||
((usage & PIPE_MAP_WRITE) && status)))) {
|
||||
pctx->flush(pctx, NULL, 0);
|
||||
etna_flush(pctx, NULL, 0, true);
|
||||
}
|
||||
|
||||
if (usage & PIPE_MAP_READ)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue