iris: Limit DG2 modifiers to DG2
authorJianxun Zhang <jianxun.zhang@intel.com>
Fri, 16 Dec 2022 19:25:35 +0000 (11:25 -0800)
committerMarge Bot <emma+marge@anholt.net>
Fri, 16 Dec 2022 21:29:41 +0000 (21:29 +0000)
These DG2 modifiers should be disabled on other devices.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20363>

src/gallium/drivers/iris/iris_resource.c

index 0649597198faec49fbf4dfaa8c79068d4f51a513..be76aaaa72fb2e9294912b96521f74358bad7a02 100644 (file)
@@ -107,10 +107,13 @@ modifier_is_supported(const struct intel_device_info *devinfo,
          return false;
       break;
    case I915_FORMAT_MOD_4_TILED:
+      if (devinfo->verx10 < 125)
+         return false;
+      break;
    case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS:
    case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS:
    case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC:
-      if (devinfo->verx10 < 125)
+      if (!intel_device_info_is_dg2(devinfo))
          return false;
       break;
    case DRM_FORMAT_MOD_INVALID: