isl: Allow CCS in more cases (xe2)

By restricting these limitations up to GFX 12, CCS support
can be present on these cases that we think Xe2+ platform
should support compression.

Noticeably, CCS is allowed on depth resources without HiZ,
multi-sampled resources without CCS, and multi-sampled
stencil resources.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31496>
This commit is contained in:
Jianxun Zhang 2024-10-02 12:41:48 -07:00 committed by Marge Bot
parent dc70e2d556
commit ab56a9eecd

View file

@ -3153,7 +3153,7 @@ isl_surf_supports_ccs(const struct isl_device *dev,
}
}
if (ISL_GFX_VER(dev) >= 12) {
if (ISL_GFX_VER(dev) == 12) {
if (isl_surf_usage_is_stencil(surf->usage)) {
/* HiZ and MCS aren't allowed with stencil */
assert(hiz_or_mcs_surf == NULL || hiz_or_mcs_surf->size_B == 0);
@ -3216,14 +3216,12 @@ isl_surf_supports_ccs(const struct isl_device *dev,
* Since the note applies to MTL, we apply this to TILE64 too.
*/
uint32_t format_bpb = isl_format_get_layout(surf->format)->bpb;
if (ISL_GFX_VER(dev) == 12 &&
surf->dim == ISL_SURF_DIM_3D &&
if (surf->dim == ISL_SURF_DIM_3D &&
(surf->tiling == ISL_TILING_ICL_Ys ||
isl_tiling_is_64(surf->tiling)) &&
(format_bpb == 64 || format_bpb == 128))
return false;
} else {
/* ISL_GFX_VER(dev) < 12 */
} else if (ISL_GFX_VER(dev) < 12) {
if (surf->samples > 1)
return false;