dzn: 3D array images don't exist
authorBoris Brezillon <boris.brezillon@collabora.com>
Thu, 31 Mar 2022 15:57:29 +0000 (17:57 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 8 Apr 2022 11:54:43 +0000 (11:54 +0000)
Let's force maxArrayLayers to one in that case.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15698>

src/microsoft/vulkan/dzn_device.cpp

index ac6446c4ca66fe6e12e1966626eef83cd6565afe..7de11969833d35d0f78dd636c00ee41313f1d370 100644 (file)
@@ -740,7 +740,7 @@ dzn_physical_device_get_image_format_properties(dzn_physical_device *pdev,
    else
       properties->imageFormatProperties.maxMipLevels = 1;
 
-   if (info->tiling == VK_IMAGE_TILING_OPTIMAL)
+   if (info->tiling == VK_IMAGE_TILING_OPTIMAL && info->type != VK_IMAGE_TYPE_3D)
       properties->imageFormatProperties.maxArrayLayers = dzn_physical_device_get_max_array_layers();
    else
       properties->imageFormatProperties.maxArrayLayers = 1;