v3dv: fix offset computed by vkGetImageSubresourceLayout for array images

Fixes:
dEQP-VK.image.subresource_layout.2d_array.*

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Iago Toral Quiroga 2020-09-01 13:01:49 +02:00 committed by Marge Bot
parent 4cc7d6a85f
commit 83336adaca
1 changed files with 2 additions and 1 deletions

View File

@ -352,7 +352,8 @@ v3dv_GetImageSubresourceLayout(VkDevice device,
const struct v3d_resource_slice *slice =
&image->slices[subresource->mipLevel];
layout->offset = slice->offset;
layout->offset =
v3dv_layer_offset(image, subresource->mipLevel, subresource->arrayLayer);
layout->rowPitch = slice->stride;
layout->depthPitch = image->cube_map_stride;
layout->arrayPitch = image->cube_map_stride;