From 11310ee621962e4cac3cd3b9dbecb62362994a55 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Thu, 13 Feb 2020 11:34:09 +0100 Subject: [PATCH] v3dv: fix buffer automatic stride for image to buffer copies When the client requests a tightly packet copy, we should take the stride from the size of the region to copy, not from the size of the image (which can be larger). Part-of: --- src/broadcom/vulkan/v3dv_meta_copy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/broadcom/vulkan/v3dv_meta_copy.c b/src/broadcom/vulkan/v3dv_meta_copy.c index 00e84f9..ffd2fba 100644 --- a/src/broadcom/vulkan/v3dv_meta_copy.c +++ b/src/broadcom/vulkan/v3dv_meta_copy.c @@ -508,12 +508,12 @@ emit_copy_layer_to_buffer_per_tile_list(struct v3dv_job *job, /* Store TLB to buffer */ uint32_t width, height; if (region->bufferRowLength == 0) - width = image->extent.width; + width = region->imageExtent.width; else width = region->bufferRowLength; if (region->bufferImageHeight == 0) - height = image->extent.height; + height = region->imageExtent.height; else height = region->bufferImageHeight; -- 2.7.4