Mesa (master): v3d: fix dest offset in TFU setup

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 15 10:36:57 UTC 2021


Module: Mesa
Branch: master
Commit: 08b16cfe0bc4eb86c166440f70435224b9f44244
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=08b16cfe0bc4eb86c166440f70435224b9f44244

Author: Juan A. Suarez Romero <jasuarez at igalia.com>
Date:   Tue Jan 12 18:45:49 2021 +0100

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 <jasuarez at igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8491>

---

 src/gallium/drivers/v3d/v3d_blit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;



More information about the mesa-commit mailing list