From 9f1cd99ba12de7605116ebe0a056c9f501024222 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 5 Nov 2020 15:50:13 -0800 Subject: [PATCH] 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: --- 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 */