intel/isl: Only set CMF on renderable views on Xe2+
The compression format is only used during rendering. This prevents drivers from hitting an unreachable when we start enabling CCS on linear surfaces which may have non-renderable and non-pow2 formats. For now, continue to use the surface format instead of the view format to look up the CMF. This strategy should return the optimal CMF for compressed surfaces that undergo redescription during copies. Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32120>
This commit is contained in:
@@ -753,7 +753,16 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
|
||||
}
|
||||
}
|
||||
|
||||
#if GFX_VERx10 >= 125
|
||||
#if GFX_VERx10 >= 200
|
||||
/* According to Bspec 58797 (r58646), the compression format is only
|
||||
* used to improve compression. It is not used for decompression.
|
||||
*/
|
||||
if (info->view->usage & (ISL_SURF_USAGE_RENDER_TARGET_BIT |
|
||||
ISL_SURF_USAGE_STORAGE_BIT)) {
|
||||
s.CompressionFormat =
|
||||
isl_get_render_compression_format(info->surf->format);
|
||||
}
|
||||
#elif GFX_VERx10 == 125
|
||||
if (info->aux_usage == ISL_AUX_USAGE_MC) {
|
||||
s.CompressionFormat =
|
||||
get_media_compression_format(info->mc_format, info->surf->format);
|
||||
|
||||
Reference in New Issue
Block a user