anv: take depth in to account in anv_GetImageSubresourceLayout
authorTapani Pälli <tapani.palli@intel.com>
Thu, 20 Aug 2020 09:49:46 +0000 (12:49 +0300)
committerMarge Bot <eric+marge@anholt.net>
Fri, 21 Aug 2020 05:57:12 +0000 (05:57 +0000)
Fixes dEQP-VK.image.subresource_layout.3d* tests on gen9.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6400>

src/intel/vulkan/anv_image.c

index 8fc5dd80f9651e00209f9269a93e329c2b08a2cd..e56d3cfb034ca5e78fd788bf4e31e3533ab17153 100644 (file)
@@ -1133,7 +1133,8 @@ void anv_GetImageSubresourceLayout(
                                           &offset_B, NULL, NULL);
       layout->offset += offset_B;
       layout->size = layout->rowPitch * anv_minify(image->extent.height,
-                                                   subresource->mipLevel);
+                                                   subresource->mipLevel) *
+                     image->extent.depth;
    } else {
       layout->size = surface->isl.size_B;
    }