<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jul 12, 2017 at 11:18 AM, Chad Versace <span dir="ltr"><<a href="mailto:chadversary@chromium.org" target="_blank">chadversary@chromium.org</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 Thu 29 Jun 2017, Jason Ekstrand wrote:<br>
> Reviewed-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
> ---<br>
>  src/mesa/drivers/dri/i965/<wbr>intel_screen.c | 55 +++++++++++++++++++++++++++++-<wbr>--<br>
>  1 file changed, 50 insertions(+), 5 deletions(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_screen.c b/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
> index 03226af..66fd99a 100644<br>
> --- a/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
> +++ b/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
> @@ -671,7 +671,21 @@ intel_create_image_common(__<wbr>DRIscreen *dri_screen,<br>
>        return NULL;<br>
>     }<br>
><br>
> -   image->bo = brw_bo_alloc_tiled(screen-><wbr>bufmgr, "image", surf.size,<br>
> +   struct isl_surf aux_surf;<br>
> +   if (mod_info->aux_usage == ISL_AUX_USAGE_CCS_E) {<br>
> +      ok = isl_surf_get_ccs_surf(&screen-<wbr>>isl_dev, &surf, &aux_surf, 0);<br>
> +      assert(ok);<br>
> +      if (!ok) {<br>
<br>
</span>Why assert(ok) then handle !ok ?<br></blockquote><div><br></div>I should probably drop the assert.  This is definitely something that can happen if you try to import an image with bad CCS information.  I thought maybe asserting in debug builds would be useful.  Thoughs?<br><br></div><div class="gmail_quote">--Jason<br></div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The rest of the patch looks good to me.<br>
<div class="HOEnZb"><div class="h5"><br>
> +         free(image);<br>
> +         return NULL;<br>
<br>
</div></div></blockquote></div><br></div></div>