<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 20, 2017 at 2:43 PM, Nanley Chery <span dir="ltr"><<a href="mailto:nanleychery@gmail.com" target="_blank">nanleychery@gmail.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 Mon, Jun 19, 2017 at 04:06:34PM -0700, Jason Ekstrand wrote:<br>
> On Tue, Jun 13, 2017 at 11:41 AM, Nanley Chery <<a href="mailto:nanleychery@gmail.com">nanleychery@gmail.com</a>><br>
> wrote:<br>
><br>
> > Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
> > ---<br>
> >  src/intel/blorp/blorp_clear.c | 4 ++++<br>
> >  1 file changed, 4 insertions(+)<br>
> ><br>
> > diff --git a/src/intel/blorp/blorp_clear.<wbr>c b/src/intel/blorp/blorp_clear.<wbr>c<br>
> > index 3d5c41cc71..f43d05ad19 100644<br>
> > --- a/src/intel/blorp/blorp_clear.<wbr>c<br>
> > +++ b/src/intel/blorp/blorp_clear.<wbr>c<br>
> > @@ -308,6 +308,10 @@ blorp_fast_clear(struct blorp_batch *batch,<br>
> >                   uint32_t level, uint32_t start_layer, uint32_t<br>
> > num_layers,<br>
> >                   uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1)<br>
> >  {<br>
> > +   /* Multi-layer and multi-LOD fast clear is only available gen8+. */<br>
> > +   assert(ISL_DEV_GEN(batch-><wbr>blorp->isl_dev) >= 8 ||<br>
> > +          (level == 0 && start_layer + num_layers == 1));<br>
> ><br>
><br>
> Alternatively, you could just add code to patch 1 which asserts that the<br>
> level/layer is in-bounds for the auxiliary surface if one exists.<br>
><br>
><br>
<br>
</span>I think your suggestion complements, but doesn't replace this patch.<br>
Your suggestion validates the level and start_layer parameters. This<br>
patch validates those parameters as well as the num_layers parameter.<br><div class="HOEnZb"><div class="h5"></div></div></blockquote><div><br></div><div>Right but maybe we should check num_layers against the aux surface rather than having a gen check?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
> > +<br>
> >     struct blorp_params params;<br>
> >     blorp_params_init(&params);<br>
> >     params.num_layers = num_layers;<br>
> > --<br>
> > 2.13.1<br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > mesa-dev mailing list<br>
> > <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> > <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
> ><br>
</div></div></blockquote></div><br></div></div>