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

Dongwon Kim dongwon.kim at intel.com
Fri Jul 6 19:05:19 UTC 2018


Hi Lionel,

The original problem we saw happened when dri format is
__DRI_IMAGE_FORMAT_XBGR2101010, which doesn't have any corresponding
ISL format available.

And yes, I verified the problem we saw doesn't happen anymore
with the latest code base possibly with your fix. So I could turn down
this patch. However, in general, doesn't it make sense to stop when
there's no matched ISL format instead of passing it down, which leads to
assertion error?

Thanks,
DW

On Fri, Jul 06, 2018 at 02:14:42PM +0100, Lionel Landwerlin wrote:
> Hi Dongwon,
> 
> Jason & I merged some patches to fix similar issues a few weeks ago.
> I think we didn't change this function because a crash or hitting an assert
> is a good indication that something's gone wrong before we run into this
> function.
> 
> If you patch fixes an issue, could you give some detail about it?
> Maybe a gdb backtrace?
> 
> Thanks,
> 
> -
> Lionel
> 
> On 05/07/18 19:27, Dongwon Kim wrote:
> >'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;
> >     }
> 
> 


More information about the mesa-dev mailing list