<div dir="ltr"><div>FYI, I don't consider this patch to be the correct approach for solving the problem. There are other callers that could run into trouble; in particular any super-small blits like 0.5-wide. I think we likely want to either do a full audit of all blorp_blit callers or somehow solve it in blorp_blit. The fact that we're using floats at all bothers me quite a bit because it means we're likely loosing some precision somewhere.</div><div><br></div><div>--Jason<br></div><div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 29, 2018 at 11:27 AM Vadim Shovkoplias <<a href="mailto:vadim.shovkoplias@gmail.com">vadim.shovkoplias@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Jason,<div><br></div><div>Looks like there is an issue with the float comparison. It works perfectly fine for me if it is compared with some precision:</div><div><br></div><div><div>if( (fabsf(*dstX1 - *dstX0) < 1e-8F) || (fabsf(*dstY1 - *dstY0) < 1e-8F) ) {</div><div> return true;</div></div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">пн, 1 окт. 2018 г. в 19:24, Eric Engestrom <<a href="mailto:eric.engestrom@intel.com" target="_blank">eric.engestrom@intel.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Monday, 2018-10-01 11:04:09 +0200, Juan A. Suarez Romero wrote:<br>
> On Tue, 2018-09-11 at 11:15 -0500, Jason Ekstrand wrote:<br>
> > Cc: <a href="mailto:mesa-stable@lists.freedesktop.org" target="_blank">mesa-stable@lists.freedesktop.org</a><br>
> > Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=107892" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=107892</a><br>
> > ---<br>
> > src/mesa/drivers/dri/i965/brw_meta_util.c | 3 +++<br>
> > 1 file changed, 3 insertions(+)<br>
> > <br>
> <br>
> This has been reviewed, but not pushed yet.<br>
> <br>
> <br>
> J.A.<br>
> <br>
> > diff --git a/src/mesa/drivers/dri/i965/brw_meta_util.c b/src/mesa/drivers/dri/i965/brw_meta_util.c<br>
> > index 908b0989769..6714d96237c 100644<br>
> > --- a/src/mesa/drivers/dri/i965/brw_meta_util.c<br>
> > +++ b/src/mesa/drivers/dri/i965/brw_meta_util.c<br>
> > @@ -247,6 +247,9 @@ brw_meta_mirror_clip_and_scissor(const struct gl_context *ctx,<br>
> > clip_src_y1, clip_dst_y1, clip_dst_y0,<br>
> > scaleY, false);<br>
> > <br>
> > + if (*dstX0 == *dstX1 || *dstY0 == *dstY1)<br>
> > + return true;<br>
<br>
This comes right after this code (few lines above in the same function):<br>
<br>
float scaleX = (float) (*srcX1 - *srcX0) / (*dstX1 - *dstX0);<br>
float scaleY = (float) (*srcY1 - *srcY0) / (*dstY1 - *dstY0);<br>
<br>
if *dstX0 == *dstX1, that would be a division by 0, so I don't think that<br>
this new `if *dstX0 == *dstX1` is reachable (same for *dstY0 == *dstY1)<br>
<br>
> > +<br>
> > /* Account for the fact that in the system framebuffer, the origin is at<br>
> > * the lower left.<br>
> > */<br>
> <br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">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/mailman/listinfo/mesa-dev</a><br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">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/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">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/mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div></div>