From: Chad Versace Date: Fri, 1 Jan 2016 18:37:25 +0000 (-0800) Subject: isl: Fix swapped if-else in isl_calc_row_pitch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a827b553;p=mesa.git isl: Fix swapped if-else in isl_calc_row_pitch The YUV case was applied to non-YUV formats. Oops. --- diff --git a/src/isl/isl.c b/src/isl/isl.c index 75f65001a1e..fe878f7fb9a 100644 --- a/src/isl/isl.c +++ b/src/isl/isl.c @@ -813,9 +813,9 @@ isl_calc_row_pitch(const struct isl_device *dev, */ if (info->usage & ISL_SURF_USAGE_RENDER_TARGET_BIT) { if (isl_format_is_yuv(info->format)) { - row_pitch = isl_align(row_pitch, fmtl->bs); - } else { row_pitch = isl_align(row_pitch, 2 * fmtl->bs); + } else { + row_pitch = isl_align(row_pitch, fmtl->bs); } } break;