From c077276c150f526a1b409f8cd4b85bbd03aeda54 Mon Sep 17 00:00:00 2001 From: "Juan A. Suarez Romero" Date: Tue, 12 Jan 2021 18:45:49 +0100 Subject: [PATCH] v3d: fix dest offset in TFU setup It is using the source level instead of the destiny level (base_level) to compute the dest offset. This fixes `framebuffer-blit-levels draw rgba -auto -fbo` piglit test. Fixes: 976ea90bdca ("v3d: Add support for using the TFU to do some blits.") Signed-off-by: Juan A. Suarez Romero Reviewed-by: Iago Toral Quiroga Part-of: (cherry picked from commit 08b16cfe0bc4eb86c166440f70435224b9f44244) --- .pick_status.json | 2 +- src/gallium/drivers/v3d/v3d_blit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index c6ae0447e18..7d65d86d7b9 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -139,7 +139,7 @@ "description": "v3d: fix dest offset in TFU setup", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "976ea90bdca2b1fc9e7a577ddc302e810c622183" }, diff --git a/src/gallium/drivers/v3d/v3d_blit.c b/src/gallium/drivers/v3d/v3d_blit.c index dd5805d55a3..5a862c25447 100644 --- a/src/gallium/drivers/v3d/v3d_blit.c +++ b/src/gallium/drivers/v3d/v3d_blit.c @@ -277,7 +277,7 @@ v3d_tfu(struct pipe_context *pctx, } uint32_t dst_offset = (dst->bo->offset + - v3d_layer_offset(pdst, src_level, dst_layer)); + v3d_layer_offset(pdst, base_level, dst_layer)); tfu.ioa |= dst_offset; if (last_level != base_level) tfu.ioa |= V3D_TFU_IOA_DIMTW;