intel/isl: Disable some gen10 CCS_E formats for now
authorNanley Chery <nanley.g.chery@intel.com>
Wed, 23 Aug 2017 17:51:28 +0000 (10:51 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Tue, 31 Oct 2017 21:26:23 +0000 (14:26 -0700)
CannonLake additionally supports R11G11B10_FLOAT and four 10-10-10-2
formats with CCS_E. None of these formats fit within the current
blorp_copy framework so disable them until support is added.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/isl/isl_format.c

index fba3ac5e1ac48ccfc9c8513fdd888fe480106283..03c591071b6976f6c1c64b934dea8855dc4ad7b2 100644 (file)
@@ -536,6 +536,30 @@ isl_format_supports_ccs_e(const struct gen_device_info *devinfo,
    if (!format_info[format].exists)
       return false;
 
+   /* For simplicity, only report that a format supports CCS_E if blorp can
+    * perform bit-for-bit copies with an image of that format while compressed.
+    * This allows ISL users to avoid having to resolve the image before
+    * performing such a copy. We may want to change this behavior in the
+    * future.
+    *
+    * R11G11B10_FLOAT has no equivalent UINT format. Given how blorp_copy
+    * currently works, bit-for-bit copy operations are not possible without an
+    * intermediate resolve.
+    */
+   if (format == ISL_FORMAT_R11G11B10_FLOAT)
+      return false;
+
+   /* blorp_copy currently doesn't support formats with different bit-widths
+    * per-channel. Until that support is added, report that these formats don't
+    * support CCS_E. FIXME: Add support for these formats.
+    */
+   if (format == ISL_FORMAT_B10G10R10A2_UNORM ||
+       format == ISL_FORMAT_B10G10R10A2_UNORM_SRGB ||
+       format == ISL_FORMAT_R10G10B10A2_UNORM ||
+       format == ISL_FORMAT_R10G10B10A2_UINT) {
+      return false;
+   }
+
    return format_gen(devinfo) >= format_info[format].ccs_e;
 }