etnaviv: use direct BLT/RS blit hook for internal copies

etna_copy_resource() and etna_copy_resource_box() are used to keep the
internal shadow copies of a resource up to date. They are supposed to
always use the RS or BLT engines to do the copy, never requiring any
fallbacks or fake format handling. They should also work regardless of
the current render condition state. So instead of going through the
pipe_context blit hook, directly call the RS or BLT blit hook on the
etna_context.

CC: mesa-stable
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/35526>
This commit is contained in:
Lucas Stach 2025-06-13 22:45:51 +02:00 committed by Marge Bot
parent b5004298aa
commit d4780f03fc

View file

@ -211,6 +211,7 @@ void
etna_copy_resource(struct pipe_context *pctx, struct pipe_resource *dst,
struct pipe_resource *src, int first_level, int last_level)
{
struct etna_context *ctx = etna_context(pctx);
struct etna_resource *src_priv = etna_resource(src);
struct etna_resource *dst_priv = etna_resource(dst);
@ -251,7 +252,7 @@ etna_copy_resource(struct pipe_context *pctx, struct pipe_resource *dst,
for (int z = 0; z < depth; z++) {
blit.src.box.z = blit.dst.box.z = z;
pctx->blit(pctx, &blit);
ctx->blit(pctx, &blit);
}
if (src == dst)
@ -266,6 +267,7 @@ etna_copy_resource_box(struct pipe_context *pctx, struct pipe_resource *dst,
struct pipe_resource *src, int dst_level, int src_level,
struct pipe_box *box)
{
struct etna_context *ctx = etna_context(pctx);
struct etna_resource *src_priv = etna_resource(src);
struct etna_resource *dst_priv = etna_resource(dst);
@ -289,7 +291,7 @@ etna_copy_resource_box(struct pipe_context *pctx, struct pipe_resource *dst,
for (int z = 0; z < box->depth; z++) {
blit.src.box.z = blit.dst.box.z = box->z + z;
pctx->blit(pctx, &blit);
ctx->blit(pctx, &blit);
}
if (src == dst)