anv: Don't advertise ASTC support on BSW
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 15 Oct 2018 18:07:06 +0000 (13:07 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 15 Oct 2018 21:55:25 +0000 (16:55 -0500)
Tested-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
src/intel/vulkan/anv_formats.c

index 33faf7cc37f4a4f89aea73150b8c1deb9fb99345..9199567f4454ae6df6534867297d2d3338fe05ec 100644 (file)
@@ -521,6 +521,14 @@ get_image_format_features(const struct gen_device_info *devinfo,
        isl_format_get_layout(plane_format.isl_format)->txc == ISL_TXC_ASTC)
       return 0;
 
+   /* ASTC requires nasty workarounds on BSW so we just disable it for now.
+    *
+    * TODO: Figure out the ASTC workarounds and re-enable on BSW.
+    */
+   if (devinfo->gen < 9 &&
+       isl_format_get_layout(plane_format.isl_format)->txc == ISL_TXC_ASTC)
+      return 0;
+
    if (isl_format_supports_sampling(devinfo, plane_format.isl_format)) {
       flags |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;