isl: Fix swapped if-else in isl_calc_row_pitch
authorChad Versace <chad.versace@intel.com>
Fri, 1 Jan 2016 18:37:25 +0000 (10:37 -0800)
committerChad Versace <chad.versace@intel.com>
Mon, 4 Jan 2016 17:57:23 +0000 (09:57 -0800)
The YUV case was applied to non-YUV formats. Oops.

src/isl/isl.c

index 75f65001a1eb76cb4faab1d135133fe635ac2b3b..fe878f7fb9a9dcfe3bbee5b15cab68711e217906 100644 (file)
@@ -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;