<p dir="ltr"><br>
On Jan 15, 2015 1:49 AM, "Kenneth Graunke" <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>> wrote:<br>
><br>
> On Thursday, January 15, 2015 01:41:14 AM Kenneth Graunke wrote:<br>
> > There's some debate about whether we should use Meta or BLORP,<br>
> > but either should run circles around the BLT engine.<br>
> ><br>
> > Improves performance in "copypixrate -blit -back" (from Mesa demos)<br>
> > by 232.037% +/- 3.15795% (n=10) on Broadwell GT3e.<br>
> ><br>
> > Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
> > ---<br>
> >  src/mesa/drivers/dri/i965/intel_fbo.c | 14 +++++++-------<br>
> >  1 file changed, 7 insertions(+), 7 deletions(-)<br>
> ><br>
> > Ben: this might be a good candidate for your braswell branch.<br>
> ><br>
> > Jason: I bet this will affect your PBO upload path.  I suspect it may<br>
> > make it a lot faster on Gen8+, as you might've been getting the BLT<br>
> > engine when trying to use BlitFramebuffer.  I haven't tested.<br>
> ><br>
> > diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c<br>
> > index 37ac613f..b54c11d 100644<br>
> > --- a/src/mesa/drivers/dri/i965/intel_fbo.c<br>
> > +++ b/src/mesa/drivers/dri/i965/intel_fbo.c<br>
> > @@ -882,6 +882,13 @@ intel_blit_framebuffer(struct gl_context *ctx,<br>
> >     if (mask == 0x0)<br>
> >        return;<br>
> ><br>
> > +   mask = _mesa_meta_BlitFramebuffer(ctx,<br>
> > +                                     srcX0, srcY0, srcX1, srcY1,<br>
> > +                                     dstX0, dstY0, dstX1, dstY1,<br>
> > +                                     mask, filter);<br>
> > +   if (mask == 0x0)<br>
> > +      return;<br>
> > +<br>
> >     if (brw->gen >= 8 && (mask & GL_STENCIL_BUFFER_BIT)) {<br>
> >        brw_meta_fbo_stencil_blit(brw_context(ctx),<br>
> >                                  srcX0, srcY0, srcX1, srcY1,<br>
> > @@ -899,13 +906,6 @@ intel_blit_framebuffer(struct gl_context *ctx,<br>
> >     if (mask == 0x0)<br>
> >        return;<br>
> ><br>
> > -   mask = _mesa_meta_BlitFramebuffer(ctx,<br>
> > -                                     srcX0, srcY0, srcX1, srcY1,<br>
> > -                                     dstX0, dstY0, dstX1, dstY1,<br>
> > -                                     mask, filter);<br>
> > -   if (mask == 0x0)<br>
> > -      return;<br>
> > -<br>
> >     _swrast_BlitFramebuffer(ctx,<br>
> >                             srcX0, srcY0, srcX1, srcY1,<br>
> >                             dstX0, dstY0, dstX1, dstY1,<br>
> ><br>
><br>
> Just realized there isn't enough context for this patch to make any sense.<br>
> It changes the ordering to:<br>
><br>
> 1. BLORP<br>
> 2. Meta<br>
> 3. Gen8 Stencil Blit (special case)<br>
> 4. BLT<br>
> 5. Software<br>
><br>
> Previously, the order was:<br>
><br>
> 1. BLORP<br>
> 2. Gen8 Stencil Blit (special case)<br>
> 3. Meta<br>
> 4. BLT<br>
> 5. Software</p>
<p dir="ltr">Those lists don't seem to match the patch. The patch moves meta up a ways. In the lists it looks like you just swap meta and stencil which, as you mentioned, does nothing.</p>
<p dir="ltr">Also, it won't affect the speed of my PBO code as it calls meta explicitly.  That could change and doing so might make it faster on older gens where we have blorp, but I'm not sure.<br>
--Jason</p>
<p dir="ltr">><br>
> (Meta doesn't handle stencil blits today, so moving it above the Gen8 stencil<br>
>  blit special case shouldn't have any effect.)<br>
><br>
> --Ken</p>