From f6222a4b927f2a7b6e8d31f9f0b17bfb6a319261 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Fri, 14 Jul 2023 18:09:59 +0200 Subject: [PATCH] etnaviv: check for valid TS as condition to create the staging resource Presence of the TS buffer doesn't necessarily mean that there is valid TS information that we need to take into account. This is pretty harmless as the blit into the staging resource will just ignore invalid TS data and most TS enabled resources are (super-)tiled anyways, which we will handle with a staging resource nonetheless, but better not keep this bad example around and replace with the appropriate check. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/drivers/etnaviv/etnaviv_transfer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_transfer.c b/src/gallium/drivers/etnaviv/etnaviv_transfer.c index 18b021e..075b4fa 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_transfer.c +++ b/src/gallium/drivers/etnaviv/etnaviv_transfer.c @@ -275,7 +275,7 @@ etna_transfer_map(struct pipe_context *pctx, struct pipe_resource *prsc, * render resource. Use the texture resource, which avoids bouncing * pixels between the two resources, and we can de-tile it in s/w. */ rsc = etna_resource(rsc->texture); - } else if (rsc->ts_bo || + } else if (etna_resource_level_ts_valid(res_level) || (rsc->layout != ETNA_LAYOUT_LINEAR && etna_resource_hw_tileable(screen->specs.use_blt, prsc) && /* HALIGN 4 resources are incompatible with the resolve engine, -- 2.7.4