nvk: tiling prep work for VK_EXT_image_2d_view_of_3d
authorKarol Herbst <kherbst@redhat.com>
Mon, 13 Jun 2022 15:25:18 +0000 (17:25 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:31:54 +0000 (21:31 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

src/nouveau/vulkan/nvk_image.c

index 3a1e2be..c50aebf 100644 (file)
@@ -60,6 +60,9 @@ nvk_image_tile_from_create_info(
    if (pCreateInfo->imageType == VK_IMAGE_TYPE_3D)
       tile.y = MIN2(tile.y, 2);
 
+   if (pCreateInfo->flags & VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT)
+      return tile;
+
         if (depth >= 32) tile.z = 5;
    else if (depth >= 16) tile.z = 4;
    else if (depth >=  8) tile.z = 3;