<p dir="ltr"><br>
On Jun 30, 2016 10:14 PM, "Pohjolainen, Topi" <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>> wrote:<br>
><br>
> On Thu, Jun 30, 2016 at 06:57:39AM -0700, Jason Ekstrand wrote:<br>
> >    On Jun 29, 2016 11:07 PM, "Pohjolainen, Topi"<br>
> >    <[1]<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>> wrote:<br>
> >    ><br>
> >    > On Wed, Jun 29, 2016 at 05:37:28PM -0700, Jason Ekstrand wrote:<br>
> >    > > ---<br>
> >    > >  src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 10 +++++-----<br>
> >    > >  1 file changed, 5 insertions(+), 5 deletions(-)<br>
> >    ><br>
> >    > Could you add some rational here? In the next patch you still use<br>
> >    > MAX2(mt->num_samples, 1) and it looks that it at least should still<br>
> >    work<br>
> >    > without this.<br>
> ><br>
> >    Over time, these will all get replaced with isl_surf.samples which are<br>
> >    1 for single sampled.  On the other hand, mt->num_samples is zero for<br>
> >    single-sampled.<br>
><br>
> Does that mean that value zero becomes illegal once we get the value from<br>
> isl_surf?</p>
<p dir="ltr">Yes it does</p>
<p dir="ltr">> ><br>
> >    > ><br>
> >    > > diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp<br>
> >    b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp<br>
> >    > > index 1e15bd5..257db06 100644<br>
> >    > > --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp<br>
> >    > > +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp<br>
> >    > > @@ -1302,7 +1302,7 @@ brw_blorp_build_nir_shader(struct brw_context<br>
> >    *brw,<br>
> >    > >     nir_ssa_def *src_pos, *dst_pos, *color;<br>
> >    > ><br>
> >    > >     /* Sanity checks */<br>
> >    > > -   if (key->dst_tiled_w && key->rt_samples > 0) {<br>
> >    > > +   if (key->dst_tiled_w && key->rt_samples > 1) {<br>
> >    > >        /* If the destination image is W tiled and multisampled,<br>
> >    then the thread<br>
> >    > >         * must be dispatched once per sample, not once per pixel.<br>
> >    This is<br>
> >    > >         * necessary because after conversion between W and Y<br>
> >    tiling, there's no<br>
> >    > > @@ -1333,13 +1333,13 @@ brw_blorp_build_nir_shader(struct<br>
> >    brw_context *brw,<br>
> >    > ><br>
> >    > >     /* Make sure layout is consistent with sample count */<br>
> >    > >     assert((key->tex_layout == INTEL_MSAA_LAYOUT_NONE) ==<br>
> >    > > -          (key->tex_samples == 0));<br>
> >    > > +          (key->tex_samples <= 1));<br>
> >    > >     assert((key->rt_layout == INTEL_MSAA_LAYOUT_NONE) ==<br>
> >    > > -          (key->rt_samples == 0));<br>
> >    > > +          (key->rt_samples <= 1));<br>
> >    > >     assert((key->src_layout == INTEL_MSAA_LAYOUT_NONE) ==<br>
> >    > > -          (key->src_samples == 0));<br>
> >    > > +          (key->src_samples <= 1));<br>
> >    > >     assert((key->dst_layout == INTEL_MSAA_LAYOUT_NONE) ==<br>
> >    > > -          (key->dst_samples == 0));<br>
> >    > > +          (key->dst_samples <= 1));<br>
> >    > ><br>
> >    > >     nir_builder b;<br>
> >    > >     nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_FRAGMENT,<br>
> >    NULL);<br>
> >    > > --<br>
> >    > > 2.5.0.400.gff86faf<br>
> >    > ><br>
> >    > > _______________________________________________<br>
> >    > > mesa-dev mailing list<br>
> >    > > [2]<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> >    > > [3]<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
> ><br>
> > References<br>
> ><br>
> >    1. mailto:<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a><br>
> >    2. mailto:<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> >    3. <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>