On Tue, Apr 19, 2016 at 3:29 PM, Chad Versace <chad.vers...@intel.com>
wrote:

> On Sat 16 Apr 2016, Jason Ekstrand wrote:
> > ---
> >  src/intel/isl/isl.h               |  7 +++++++
> >  src/intel/isl/isl_storage_image.c | 10 ++++++++++
> >  2 files changed, 17 insertions(+)
>
> > +bool
> > +isl_has_matching_typed_storage_image_format(const struct
> brw_device_info *devinfo,
> > +                                            enum isl_format fmt)
> > +{
> > +   return (isl_format_get_layout(fmt)->bs <= 4 ||
> > +           (isl_format_get_layout(fmt)->bs <= 8 &&
> > +            (devinfo->gen >= 8 || devinfo->is_haswell)) ||
> > +           devinfo->gen >= 9);
> > +}
>
> Please use the prevalent style in i965 for chained branches on the gen.
> It's much easier to read and verify correct. Gens are listed in
> decreasing order, newest to oldest:
>
>         if (devinfo->gen >= 9) {
>                 return true;
>         } else if (devinfo->gen >= 8 || devinfo->is_haswell) {
>                 return isl_format_get_layout(fmt)->bs <= 8;
>         } else {
>                 return (isl_format_get_layout(fmt)->bs <= 4;
>         }
>

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

Reply via email to