intel/isl: Don't check pitch in isl_surf_get_mcs_surf

The pitch check for 16x multisampled surfaces should already be covered
by the pitch_in_range check in isl_calc_row_pitch.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14464>
This commit is contained in:
Nanley Chery 2021-12-07 20:37:25 -05:00 committed by Marge Bot
parent c47b8d7bf3
commit bf9466e285
1 changed files with 0 additions and 10 deletions

View File

@ -2080,16 +2080,6 @@ isl_surf_get_mcs_surf(const struct isl_device *dev,
if (ISL_GFX_VER(dev) == 7 && isl_format_has_sint_channel(surf->format))
return false;
/* The "Auxiliary Surface Pitch" field in RENDER_SURFACE_STATE is only 9
* bits which means the maximum pitch of a compression surface is 512
* tiles or 64KB (since MCS is always Y-tiled). Since a 16x MCS buffer is
* 64bpp, this gives us a maximum width of 8192 pixels. We can create
* larger multisampled surfaces, we just can't compress them. For 2x, 4x,
* and 8x, we have enough room for the full 16k supported by the hardware.
*/
if (surf->samples == 16 && surf->logical_level0_px.width > 8192)
return false;
enum isl_format mcs_format;
switch (surf->samples) {
case 2: mcs_format = ISL_FORMAT_MCS_2X; break;