[Mesa-dev] [PATCH 3/3] anv/formats: Disallow 1D compressed textures

Nanley Chery nanleychery at gmail.com
Fri Sep 23 00:19:55 UTC 2016


Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
 src/intel/vulkan/anv_formats.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index 701add5..accf45c 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -496,6 +496,17 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties(
       break;
    }
 
+   /* Our hardware doesn't support 1D compressed textures.
+    *    From the SKL PRM, RENDER_SURFACE_STATE::SurfaceFormat:
+    *    * This field cannot be a compressed (BC*, DXT*, FXT*, ETC*, EAC*) format
+    *       if the Surface Type is SURFTYPE_1D.
+    *    * This field cannot be ASTC format if the Surface Type is SURFTYPE_1D.
+    */
+   if (type == VK_IMAGE_TYPE_1D &&
+       isl_format_is_compressed(anv_formats[format].isl_format)) {
+       goto unsupported;
+   }
+
    if (tiling == VK_IMAGE_TILING_OPTIMAL &&
        type == VK_IMAGE_TYPE_2D &&
        (format_feature_flags & (VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT |
-- 
2.10.0



More information about the mesa-dev mailing list