[Mesa-stable] [Mesa-dev] [PATCH] i965: Don't bother to call blorp if the blit is zero-sized

Vadim Shovkoplias vadim.shovkoplias at gmail.com
Mon Oct 29 16:27:24 UTC 2018


Hi Jason,

Looks like there is an issue with the float comparison. It works perfectly
fine for me if it is compared with some precision:

if( (fabsf(*dstX1 - *dstX0) < 1e-8F) || (fabsf(*dstY1 - *dstY0) < 1e-8F) ) {
      return true;



пн, 1 окт. 2018 г. в 19:24, Eric Engestrom <eric.engestrom at intel.com>:

> On Monday, 2018-10-01 11:04:09 +0200, Juan A. Suarez Romero wrote:
> > On Tue, 2018-09-11 at 11:15 -0500, Jason Ekstrand wrote:
> > > Cc: mesa-stable at lists.freedesktop.org
> > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107892
> > > ---
> > >  src/mesa/drivers/dri/i965/brw_meta_util.c | 3 +++
> > >  1 file changed, 3 insertions(+)
> > >
> >
> > This has been reviewed, but not pushed yet.
> >
> >
> >       J.A.
> >
> > > diff --git a/src/mesa/drivers/dri/i965/brw_meta_util.c
> b/src/mesa/drivers/dri/i965/brw_meta_util.c
> > > index 908b0989769..6714d96237c 100644
> > > --- a/src/mesa/drivers/dri/i965/brw_meta_util.c
> > > +++ b/src/mesa/drivers/dri/i965/brw_meta_util.c
> > > @@ -247,6 +247,9 @@ brw_meta_mirror_clip_and_scissor(const struct
> gl_context *ctx,
> > >                      clip_src_y1, clip_dst_y1, clip_dst_y0,
> > >                      scaleY, false);
> > >
> > > +   if (*dstX0 == *dstX1 || *dstY0 == *dstY1)
> > > +      return true;
>
> This comes right after this code (few lines above in the same function):
>
>   float scaleX = (float) (*srcX1 - *srcX0) / (*dstX1 - *dstX0);
>   float scaleY = (float) (*srcY1 - *srcY0) / (*dstY1 - *dstY0);
>
> if *dstX0 == *dstX1, that would be a division by 0, so I don't think that
> this new `if *dstX0 == *dstX1` is reachable (same for *dstY0 == *dstY1)
>
> > > +
> > >     /* Account for the fact that in the system framebuffer, the origin
> is at
> > >      * the lower left.
> > >      */
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20181029/63021eaa/attachment.html>


More information about the mesa-stable mailing list