From: Chad Versace Date: Thu, 3 Dec 2015 02:41:08 +0000 (-0800) Subject: anv/image: Vulkan's depthPitch is in bytes, not rows X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57941b61ab12a2c9f6cd97fd08fea5d1ae04414e;p=mesa.git anv/image: Vulkan's depthPitch is in bytes, not rows Fix for VkGetImageSubresourceLayout. --- diff --git a/src/vulkan/anv_image.c b/src/vulkan/anv_image.c index c831d756407..157357ea74d 100644 --- a/src/vulkan/anv_image.c +++ b/src/vulkan/anv_image.c @@ -417,7 +417,9 @@ anv_surface_get_subresource_layout(struct anv_image *image, layout->offset = surface->offset; layout->rowPitch = surface->stride; - layout->depthPitch = surface->qpitch; + + /* Anvil's qpitch is in units of rows. Vulkan's depthPitch is in bytes. */ + layout->depthPitch = surface->qpitch * surface->stride; /* FINISHME: We really shouldn't be doing this calculation here */ if (image->array_size > 1)