intel/isl: Move the Tile4 modifier score case down
authorNanley Chery <nanley.g.chery@intel.com>
Thu, 4 May 2023 20:36:21 +0000 (13:36 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 20 Jul 2023 20:53:27 +0000 (20:53 +0000)
Group modifiers by platform first, then the score. I find it easier to
read this way.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24120>

src/intel/isl/isl_drm.c

index b8855db..0520c0d 100644 (file)
@@ -202,12 +202,6 @@ isl_drm_modifier_get_score(const struct intel_device_info *devinfo,
          return 0;
 
       return 3;
-   case I915_FORMAT_MOD_4_TILED:
-      /* Gfx12.5 introduces Tile4. */
-      if (devinfo->verx10 < 125)
-         return 0;
-
-      return 3;
    case I915_FORMAT_MOD_Y_TILED_CCS:
       /* Not supported before Gfx9 and also Gfx12's CCS layout differs from
        * Gfx9-11.
@@ -219,6 +213,12 @@ isl_drm_modifier_get_score(const struct intel_device_info *devinfo,
          return 0;
 
       return 4;
+   case I915_FORMAT_MOD_4_TILED:
+      /* Gfx12.5 introduces Tile4. */
+      if (devinfo->verx10 < 125)
+         return 0;
+
+      return 3;
    }
 }