[Mesa-dev] [PATCH] i965: don't check ccs_e support if isl_format is ISL_FORMAT_UNSUPPORTED

Dongwon Kim dongwon.kim at intel.com
Thu Jul 5 18:27:41 UTC 2018


'ISL_FORMAT_UNSUPPORTED' shouldn't be passed down for evaluation as it is
strictly prohibited in isl code (e.g. format_info_exists).

Signed-off-by: Dongwon Kim <dongwon.kim at intel.com>
---
 src/mesa/drivers/dri/i965/intel_screen.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index cb357419a7..a65042da72 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -346,8 +346,16 @@ modifier_is_supported(const struct gen_device_info *devinfo,
        */
       format = _mesa_format_fallback_rgbx_to_rgba(format);
       format = _mesa_get_srgb_format_linear(format);
-      if (!isl_format_supports_ccs_e(devinfo,
-                                     brw_isl_format_for_mesa_format(format)))
+
+      enum isl_format isl_format;
+      isl_format = brw_isl_format_for_mesa_format(format);
+
+      /* whether there is supported ISL format for given mesa format */
+      if (isl_format == ISL_FORMAT_UNSUPPORTED)
+         return false;
+
+      /* check if isl_fomat supports ccs_e */
+      if (!isl_format_supports_ccs_e(devinfo, isl_format))
          return false;
    }
 
-- 
2.18.0



More information about the mesa-dev mailing list