summaryrefslogtreecommitdiff
path: root/src/intel/isl/isl_format.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2018-03-06 16:35:47 -0800
committerMarge Bot <eric+marge@anholt.net>2020-01-25 17:48:54 +0000
commit4d03e5312732c1ad48cc116b03573b7156fdb5da (patch)
treeaade0f1ef6e58176cca760e7c47bc8b2b3502472 /src/intel/isl/isl_format.c
parentf132e0fddfad0f7f801a611ed24146327b3d21f2 (diff)
intel/isl: Allow CCS_E on more formats
Now that BLORP supports copies on everything except R11G11B10_FLOAT, we should be able to support CCS_E those formats. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3554> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3554>
Diffstat (limited to 'src/intel/isl/isl_format.c')
-rw-r--r--src/intel/isl/isl_format.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/src/intel/isl/isl_format.c b/src/intel/isl/isl_format.c
index ae6df522359..b7989720aee 100644
--- a/src/intel/isl/isl_format.c
+++ b/src/intel/isl/isl_format.c
@@ -562,31 +562,12 @@ isl_format_supports_ccs_e(const struct gen_device_info *devinfo,
/* 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.
- *
- * The following formats have no equivalent UINT format. Given how
- * blorp_copy currently works, bit-for-bit copy operations are not possible
- * without an intermediate resolve.
+ * Unfortunately, R11G11B10_FLOAT is in a compression class of its own and
+ * there is no way to copy to/from it which doesn't potentially loose data
+ * if one of the bit patterns being copied isn't valid finite floats.
*/
- switch (format) {
- case ISL_FORMAT_R11G11B10_FLOAT:
- case ISL_FORMAT_B5G5R5X1_UNORM:
- case ISL_FORMAT_B5G5R5X1_UNORM_SRGB:
- case ISL_FORMAT_B5G5R5A1_UNORM:
- case ISL_FORMAT_B5G5R5A1_UNORM_SRGB:
- case ISL_FORMAT_A4B4G4R4_UNORM:
- case ISL_FORMAT_B4G4R4A4_UNORM:
- case ISL_FORMAT_B4G4R4A4_UNORM_SRGB:
- case ISL_FORMAT_B5G6R5_UNORM:
- case ISL_FORMAT_B5G6R5_UNORM_SRGB:
- case ISL_FORMAT_A1B5G5R5_UNORM:
- case ISL_FORMAT_A8_UNORM:
+ if (format == ISL_FORMAT_R11G11B10_FLOAT)
return false;
- default:
- break;
- }
return format_gen(devinfo) >= format_info[format].ccs_e;
}