isl: require hiz for depth surface in isl_surf_get_ccs_surf

Fixes: 752eefdb ("intel/isl: Refactor isl_surf_get_ccs_surf")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10768>
(cherry picked from commit 343d90b6ab)
This commit is contained in:
Tapani Pälli 2021-05-12 15:19:43 +03:00 committed by Eric Engestrom
parent 4e8adee4f7
commit 91f972af19
2 changed files with 6 additions and 1 deletions

View file

@ -409,7 +409,7 @@
"description": "isl: require hiz for depth surface in isl_surf_get_ccs_surf",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "752eefdb3db18389dba56dd7c4f9ca45ebe8fadd"
},

View file

@ -2116,6 +2116,11 @@ isl_surf_get_ccs_surf(const struct isl_device *dev,
return false;
if (ISL_GFX_VER(dev) >= 12) {
/* With depth surfaces, HIZ is required for CCS. */
if (surf->usage & ISL_SURF_USAGE_DEPTH_BIT &&
aux_surf->tiling != ISL_TILING_HIZ)
return false;
enum isl_format ccs_format;
switch (isl_format_get_layout(surf->format)->bpb) {
case 8: ccs_format = ISL_FORMAT_GFX12_CCS_8BPP_Y0; break;