Mesa (master): intel/isl: Allow CCS_E on more formats
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Jan 25 18:04:06 UTC 2020
Module: Mesa
Branch: master
Commit: 4d03e5312732c1ad48cc116b03573b7156fdb5da
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4d03e5312732c1ad48cc116b03573b7156fdb5da
Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date: Tue Mar 6 16:35:47 2018 -0800
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 at 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>
---
src/intel/isl/isl_format.c | 27 ++++-----------------------
1 file 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;
}
More information about the mesa-commit
mailing list