From 3faa7db05332395097ea5dcccfc0d044cbf74101 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Wed, 25 Mar 2020 08:23:45 +0100 Subject: [PATCH] v3dv: fix incorrect image slice selection Part-of: --- src/broadcom/vulkan/v3dv_meta_copy.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/broadcom/vulkan/v3dv_meta_copy.c b/src/broadcom/vulkan/v3dv_meta_copy.c index 6f83b07..79d71ac 100644 --- a/src/broadcom/vulkan/v3dv_meta_copy.c +++ b/src/broadcom/vulkan/v3dv_meta_copy.c @@ -221,11 +221,10 @@ emit_rcl_prologue(struct v3dv_job *job, uint32_t clear_pad = 0; if (clear_info->image) { const struct v3dv_image *image = clear_info->image; - if (image->slices[clear_info->layer].tiling == VC5_TILING_UIF_NO_XOR || - image->slices[clear_info->layer].tiling == VC5_TILING_UIF_XOR) { - const struct v3d_resource_slice *slice = - &image->slices[clear_info->level]; - + const struct v3d_resource_slice *slice = + &image->slices[clear_info->level]; + if (slice->tiling == VC5_TILING_UIF_NO_XOR || + slice->tiling == VC5_TILING_UIF_XOR) { int uif_block_height = v3d_utile_height(image->cpp) * 2; uint32_t implicit_padded_height = -- 2.7.4