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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Iago Toral Quiroga 2020-02-13 11:34:09 +01:00 committed by Marge Bot
parent 8da9da87a6
commit 11310ee621

View file

@ -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;