<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jul 14, 2017 at 11:46 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">On Wed 12 Jul 2017, Jason Ekstrand wrote:<br>
> On Wed, Jul 12, 2017 at 11:18 AM, Chad Versace <[1]<a href="mailto:chadversary@chromium.org">chadversary@chromium.org</a>><br>
<span class="">> wrote:<br>
><br>
> On Thu 29 Jun 2017, Jason Ekstrand wrote:<br>
</span>> > Reviewed-by: Topi Pohjolainen <[2]<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a><wbr>><br>
<span class="">> > ---<br>
> > src/mesa/drivers/dri/i965/<wbr>intel_screen.c | 55<br>
> +++++++++++++++++++++++++++++-<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/<br>
> dri/i965/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>
> Why assert(ok) then handle !ok ?<br>
><br>
><br>
> I should probably drop the assert. This is definitely something that can<br>
> happen if you try to import an image with bad CCS information. I thought maybe<br>
> asserting in debug builds would be useful. Thoughs?<br>
<br>
</span>If it's an error that we recover from, then it's better to emit<br>
an error message. Or, alternatively, do the assert and delete the<br>
recovery code.<br>
</blockquote></div><br></div><div class="gmail_extra">It's not recoverable in the sense that the surface would be unusable. I'll drop the assert and just let it error out.<br></div></div>