From d4780f03fca5321b02b71dd03afe6b66c40d9cc8 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Fri, 13 Jun 2025 22:45:51 +0200 Subject: [PATCH] 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 Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c index 233c658e31e..55e458c45f0 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c +++ b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c @@ -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)