diff options
author | Chad Versace <[email protected]> | 2015-12-02 18:41:08 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2015-12-03 15:26:11 -0800 |
commit | 57941b61ab12a2c9f6cd97fd08fea5d1ae04414e (patch) | |
tree | f13f39a3024dd52d4f99c3adde7e9e139968441e /src | |
parent | bfeaf67391ced69c18f8abfc1ce6cede3e0ffb27 (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.c | 4 |
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) |