<div dir="auto">What hardware are you running on?  Prior to sky lake, depth pitch makes so sense for us.  On sky lake and above it should be exactly the same as array pitch.  One thing we should do is not report array pitch for 3D and maybe report a depth pitch of zero on broadwell and earlier.</div><div class="gmail_extra"><br><div class="gmail_quote">On Dec 3, 2016 7:51 AM, "Lionel Landwerlin" <<a href="mailto:llandwerlin@gmail.com">llandwerlin@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">With a 3d image of 2x2x3, vkGetImageSubresourceLayout currently reports :<br>
<br>
VkSubresourceLayout = { offset = 0,<br>
                        size = 160,<br>
                        rowPitch = 16,<br>
                        arrayPitch = 96,<br>
                        depthPitch = 96 }<br>
<br>
depthPitch should be 32.<br>
<br>
Signed-off-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com">lionel.g.landwerlin@intel.com</a><wbr>><br>
---<br>
 src/intel/vulkan/anv_image.c | 3 ++-<br>
 1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c<br>
index e60373a..9ef0760 100644<br>
--- a/src/intel/vulkan/anv_image.c<br>
+++ b/src/intel/vulkan/anv_image.c<br>
@@ -376,7 +376,8 @@ anv_surface_get_subresource_<wbr>layout(struct anv_image *image,<br>
<br>
    layout->offset = surface->offset;<br>
    layout->rowPitch = surface->isl.row_pitch;<br>
-   layout->depthPitch = isl_surf_get_array_pitch(&<wbr>surface->isl);<br>
+   layout->depthPitch =<br>
+      isl_surf_get_array_pitch(&<wbr>surface->isl) / image->extent.depth;<br>
    layout->arrayPitch = isl_surf_get_array_pitch(&<wbr>surface->isl);<br>
    layout->size = surface->isl.size;<br>
 }<br>
<font color="#888888">--<br>
2.10.2<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></blockquote></div><br></div>