'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....@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

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to