From: Dave Airlie <airl...@redhat.com>

This is what radeonsi does, so we should do the same, also vega
doesn't support linear depth textures anyways.

Signed-off-by: Dave Airlie <airl...@redhat.com>
---
 src/amd/vulkan/radv_image.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 78f52a8..684e804 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -44,12 +44,16 @@ radv_choose_tiling(struct radv_device *Device,
                return RADEON_SURF_MODE_LINEAR_ALIGNED;
        }
 
-       /* Textures with a very small height are recommended to be linear. */
-       if (pCreateInfo->imageType == VK_IMAGE_TYPE_1D ||
-           /* Only very thin and long 2D textures should benefit from
-            * linear_aligned. */
-           (pCreateInfo->extent.width > 8 && pCreateInfo->extent.height <= 2))
-               return RADEON_SURF_MODE_LINEAR_ALIGNED;
+       if (!vk_format_is_compressed(pCreateInfo->format) &&
+           !vk_format_is_depth_or_stencil(pCreateInfo->format)) {
+               /* Textures with a very small height are recommended to be 
linear. */
+               if (pCreateInfo->imageType == VK_IMAGE_TYPE_1D ||
+                   /* Only very thin and long 2D textures should benefit from
+                    * linear_aligned. */
+                   (pCreateInfo->extent.width > 8 && 
pCreateInfo->extent.height <= 2))
+                       return RADEON_SURF_MODE_LINEAR_ALIGNED;
+
+       }
 
        /* MSAA resources must be 2D tiled. */
        if (pCreateInfo->samples > 1)
-- 
2.9.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to