isl/formats: Report ETC as being samplable on Bay Trail
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 27 Jul 2016 00:32:01 +0000 (17:32 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 23 Aug 2016 18:45:24 +0000 (11:45 -0700)
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
src/intel/isl/isl_format.c

index ef1324c..28f63a7 100644 (file)
@@ -372,6 +372,15 @@ isl_format_supports_sampling(const struct brw_device_info *devinfo,
    if (!format_info[format].exists)
       return false;
 
+   if (devinfo->is_baytrail) {
+      const struct isl_format_layout *fmtl = isl_format_get_layout(format);
+      /* Support for ETC1 and ETC2 exists on Bay Trail even though big-core
+       * GPUs didn't get it until Broadwell.
+       */
+      if (fmtl->txc == ISL_TXC_ETC1 || fmtl->txc == ISL_TXC_ETC2)
+         return true;
+   }
+
    return format_gen(devinfo) >= format_info[format].sampling;
 }
 
@@ -382,6 +391,15 @@ isl_format_supports_filtering(const struct brw_device_info *devinfo,
    if (!format_info[format].exists)
       return false;
 
+   if (devinfo->is_baytrail) {
+      const struct isl_format_layout *fmtl = isl_format_get_layout(format);
+      /* Support for ETC1 and ETC2 exists on Bay Trail even though big-core
+       * GPUs didn't get it until Broadwell.
+       */
+      if (fmtl->txc == ISL_TXC_ETC1 || fmtl->txc == ISL_TXC_ETC2)
+         return true;
+   }
+
    return format_gen(devinfo) >= format_info[format].filtering;
 }