aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/isl/isl_format.c
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2017-08-23 10:51:28 -0700
committerNanley Chery <[email protected]>2017-10-31 14:26:23 -0700
commitc7baaafe543ee5d4756fdd034a89fdcc47429a7e (patch)
treecd87dacbaffadbaef01a1b7f9068f2350735af7a /src/intel/isl/isl_format.c
parent3ba973fe3784438690c4029f18ab5b514f7ae5d1 (diff)
intel/isl: Disable some gen10 CCS_E formats for now
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 <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/isl/isl_format.c')
-rw-r--r--src/intel/isl/isl_format.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/intel/isl/isl_format.c b/src/intel/isl/isl_format.c
index fba3ac5e1ac..03c591071b6 100644
--- a/src/intel/isl/isl_format.c
+++ b/src/intel/isl/isl_format.c
@@ -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;
}