intel/blorp: Add depth usage check for copy format

We will soon update the CCS_E aux-usage check to a CCS_E format check.
Since depth formats support CCS_E on gfx12+, add another check for the
depth usage to prevent depth surfaces from falling into the CCS_E copy
format case.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23087>
This commit is contained in:
Nanley Chery
2023-05-08 15:25:12 -07:00
committed by Marge Bot
parent 85142f3fce
commit 1ac1b17087
+6
View File
@@ -2925,6 +2925,12 @@ blorp_copy(struct blorp_batch *batch,
*/
params.src.view.format = params.dst.surf.format;
params.dst.view.format = params.dst.surf.format;
} else if (isl_surf_usage_is_depth(params.src.surf.usage) ||
isl_surf_usage_is_depth(params.dst.surf.usage)) {
assert(src_fmtl->bpb == dst_fmtl->bpb);
params.src.view.format =
params.dst.view.format =
get_copy_format_for_bpb(isl_dev, dst_fmtl->bpb);
} else if (params.dst.aux_usage == ISL_AUX_USAGE_CCS_E ||
params.dst.aux_usage == ISL_AUX_USAGE_GFX12_CCS_E) {
params.dst.view.format = get_ccs_compatible_copy_format(dst_fmtl);