summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2015-12-02 18:41:08 -0800
committerChad Versace <[email protected]>2015-12-03 15:26:11 -0800
commit57941b61ab12a2c9f6cd97fd08fea5d1ae04414e (patch)
treef13f39a3024dd52d4f99c3adde7e9e139968441e /src
parentbfeaf67391ced69c18f8abfc1ce6cede3e0ffb27 (diff)
anv/image: Vulkan's depthPitch is in bytes, not rows
Fix for VkGetImageSubresourceLayout.
Diffstat (limited to 'src')
-rw-r--r--src/vulkan/anv_image.c4
1 files changed, 3 insertions, 1 deletions
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)