Mesa (master): turnip: Fix image size for 3D vkGetImageSubresourceLayout.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 6 18:56:39 UTC 2020


Module: Mesa
Branch: master
Commit: 9f1cd99ba12de7605116ebe0a056c9f501024222
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f1cd99ba12de7605116ebe0a056c9f501024222

Author: Eric Anholt <eric at anholt.net>
Date:   Thu Nov  5 15:50:13 2020 -0800

turnip: Fix image size for 3D vkGetImageSubresourceLayout.

Fixes most subcases of dEQP-VK.image.subresource_layout.3d.* The remaining
failures appear to be in snorm, which 2D also fails on (and the blob
reports as not supported for this test).

We don't currently have these tests in CI, but they'll appear with
1.2.4.0.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7467>

---

 src/freedreno/vulkan/tu_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c
index 4679c8be929..38666091a0d 100644
--- a/src/freedreno/vulkan/tu_image.c
+++ b/src/freedreno/vulkan/tu_image.c
@@ -744,10 +744,10 @@ tu_GetImageSubresourceLayout(VkDevice _device,
 
    pLayout->offset =
       fdl_surface_offset(layout, pSubresource->mipLevel, pSubresource->arrayLayer);
-   pLayout->size = slice->size0;
    pLayout->rowPitch = fdl_pitch(layout, pSubresource->mipLevel);
    pLayout->arrayPitch = fdl_layer_stride(layout, pSubresource->mipLevel);
    pLayout->depthPitch = slice->size0;
+   pLayout->size = pLayout->depthPitch * layout->depth0;
 
    if (fdl_ubwc_enabled(layout, pSubresource->mipLevel)) {
       /* UBWC starts at offset 0 */



More information about the mesa-commit mailing list