<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 19, 2016 at 3:29 PM, Chad Versace <span dir="ltr"><<a href="mailto:chad.versace@intel.com" target="_blank">chad.versace@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat 16 Apr 2016, Jason Ekstrand wrote:<br>
> ---<br>
> src/intel/isl/isl.h | 7 +++++++<br>
> src/intel/isl/isl_storage_image.c | 10 ++++++++++<br>
> 2 files changed, 17 insertions(+)<br>
<br>
</span><span class="">> +bool<br>
> +isl_has_matching_typed_storage_image_format(const struct brw_device_info *devinfo,<br>
> + enum isl_format fmt)<br>
> +{<br>
> + return (isl_format_get_layout(fmt)->bs <= 4 ||<br>
> + (isl_format_get_layout(fmt)->bs <= 8 &&<br>
> + (devinfo->gen >= 8 || devinfo->is_haswell)) ||<br>
> + devinfo->gen >= 9);<br>
> +}<br>
<br>
</span>Please use the prevalent style in i965 for chained branches on the gen.<br>
It's much easier to read and verify correct. Gens are listed in<br>
decreasing order, newest to oldest:<br>
<br>
if (devinfo->gen >= 9) {<br>
return true;<br>
} else if (devinfo->gen >= 8 || devinfo->is_haswell) {<br>
return isl_format_get_layout(fmt)->bs <= 8;<br>
} else {<br>
return (isl_format_get_layout(fmt)->bs <= 4;<br>
}<br>
</blockquote></div><br></div><div class="gmail_extra">Done.<br></div></div>