Mesa (main): intel/isl: Unify fmt checks in isl_surf_supports_ccs
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Dec 1 20:53:08 UTC 2021
Module: Mesa
Branch: main
Commit: 1433fe7860af96edcd1758e15ce9081f637e3d0d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1433fe7860af96edcd1758e15ce9081f637e3d0d
Author: Nanley Chery <nanley.g.chery at intel.com>
Date: Mon Aug 16 08:48:31 2021 -0700
intel/isl: Unify fmt checks in isl_surf_supports_ccs
On TGL+, require that the surface format supports CCS_E in order to
support CCS. This aligns with the ISL code that pads the primary
surface for CCS on this platform.
Pre-TGL, require support for either CCS_D or CCS_E.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12398>
---
src/intel/isl/isl.c | 15 ++-------------
src/intel/isl/isl_format.c | 6 ++++++
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index 4fdece4f5c7..2c980e3f9f5 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -2133,10 +2133,8 @@ isl_surf_supports_ccs(const struct isl_device *dev,
if (surf->usage & ISL_SURF_USAGE_DISABLE_AUX_BIT)
return false;
- if (isl_format_is_compressed(surf->format))
- return false;
-
- if (!isl_is_pow2(isl_format_get_layout(surf->format)->bpb))
+ if (!isl_format_supports_ccs_d(dev->info, surf->format) &&
+ !isl_format_supports_ccs_e(dev->info, surf->format))
return false;
/* From the Ivy Bridge PRM, Vol2 Part1 11.7 "MCS Buffer for Render
@@ -2262,15 +2260,6 @@ isl_surf_supports_ccs(const struct isl_device *dev,
(surf->levels > 1 || surf->logical_level0_px.array_len > 1))
return false;
- /* From the Ivy Bridge PRM, Vol2 Part1 11.7 "MCS Buffer for Render
- * Target(s)", beneath the "Fast Color Clear" bullet (p326):
- *
- * - MCS buffer for non-MSRT is supported only for RT formats 32bpp,
- * 64bpp, and 128bpp.
- */
- if (isl_format_get_layout(surf->format)->bpb < 32)
- return false;
-
/* From the Skylake documentation, it is made clear that X-tiling is no
* longer supported:
*
diff --git a/src/intel/isl/isl_format.c b/src/intel/isl/isl_format.c
index 0ad129868aa..9b4359fa24b 100644
--- a/src/intel/isl/isl_format.c
+++ b/src/intel/isl/isl_format.c
@@ -835,6 +835,12 @@ isl_format_supports_ccs_d(const struct intel_device_info *devinfo,
const struct isl_format_layout *fmtl = isl_format_get_layout(format);
+ /* From the Ivy Bridge PRM, Vol2 Part1 11.7 "MCS Buffer for Render
+ * Target(s)", beneath the "Fast Color Clear" bullet (p326):
+ *
+ * - MCS buffer for non-MSRT is supported only for RT formats 32bpp,
+ * 64bpp, and 128bpp.
+ */
return fmtl->bpb == 32 || fmtl->bpb == 64 || fmtl->bpb == 128;
}
More information about the mesa-commit
mailing list