From: Jason Ekstrand Date: Wed, 4 Dec 2019 21:49:15 +0000 (-0600) Subject: intel/blorp: Use the source format when using blorp_copy with HiZ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b274469daae;p=mesa.git intel/blorp: Use the source format when using blorp_copy with HiZ Reviewed-by: Kenneth Graunke --- diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c index b63a6e53e23..a6811f3aede 100644 --- a/src/intel/blorp/blorp_blit.c +++ b/src/intel/blorp/blorp_blit.c @@ -2588,6 +2588,7 @@ blorp_copy(struct blorp_batch *batch, isl_format_get_layout(params.dst.surf.format); assert(params.src.aux_usage == ISL_AUX_USAGE_NONE || + params.src.aux_usage == ISL_AUX_USAGE_HIZ || params.src.aux_usage == ISL_AUX_USAGE_MCS || params.src.aux_usage == ISL_AUX_USAGE_MCS_CCS || params.src.aux_usage == ISL_AUX_USAGE_CCS_E); @@ -2596,7 +2597,14 @@ blorp_copy(struct blorp_batch *batch, params.dst.aux_usage == ISL_AUX_USAGE_MCS_CCS || params.dst.aux_usage == ISL_AUX_USAGE_CCS_E); - if (params.dst.aux_usage == ISL_AUX_USAGE_CCS_E) { + if (params.src.aux_usage == ISL_AUX_USAGE_HIZ) { + /* Depth <-> Color copies are not allowed and HiZ isn't allowed in + * destinations because we draw as color. + */ + assert(params.dst.aux_usage == ISL_AUX_USAGE_NONE); + params.src.view.format = params.src.surf.format; + params.dst.view.format = params.src.surf.format; + } else if (params.dst.aux_usage == ISL_AUX_USAGE_CCS_E) { params.dst.view.format = get_ccs_compatible_uint_format(dst_fmtl); if (params.src.aux_usage == ISL_AUX_USAGE_CCS_E) { params.src.view.format = get_ccs_compatible_uint_format(src_fmtl);