<p dir="ltr"><br>
On Dec 4, 2014 1:07 AM, "Iago Toral" <<a href="mailto:itoral@igalia.com">itoral@igalia.com</a>> wrote:<br>
><br>
> On Wed, 2014-12-03 at 14:26 -0800, Jason Ekstrand wrote:<br>
> ><br>
> ><br>
> > On Wed, Dec 3, 2014 at 2:15 PM, Ian Romanick <<a href="mailto:idr@freedesktop.org">idr@freedesktop.org</a>><br>
> > wrote:<br>
> > This patch is<br>
> ><br>
> > Reviewed-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
> ><br>
> > Should it also be tagged for 10.4?<br>
> ><br>
> ><br>
> > Yes, it should.<br>
><br>
> Should I add "Cc: 10.4 <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a>>" then?<br>
><br>
> Iago</p>
<p dir="ltr">Yes</p>
<p dir="ltr">><br>
> ><br>
> ><br>
> ><br>
> > On 12/01/2014 03:04 AM, Iago Toral Quiroga wrote:<br>
> > > From: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>><br>
> > ><br>
> > > This patch fixes the return of a wrong value when x is lower<br>
> > than<br>
> > > -MAX_INT(src_bits) as the result would not be between [-1.0<br>
> > 1.0].<br>
> > ><br>
> > > v2 by Samuel Iglesias <<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a>>:<br>
> > > - Modify unorm_to_float() to avoid doing the division<br>
> > when<br>
> > > x == -MAX_INT(src_bits)<br>
> > > ---<br>
> > > src/mesa/main/format_utils.c | 2 +-<br>
> > > 1 file changed, 1 insertion(+), 1 deletion(-)<br>
> > ><br>
> > > diff --git a/src/mesa/main/format_utils.c<br>
> > b/src/mesa/main/format_utils.c<br>
> > > index 93a0cea..5dd0848 100644<br>
> > > --- a/src/mesa/main/format_utils.c<br>
> > > +++ b/src/mesa/main/format_utils.c<br>
> > > @@ -152,7 +152,7 @@ unorm_to_float(unsigned x, unsigned<br>
> > src_bits)<br>
> > > static inline float<br>
> > > snorm_to_float(int x, unsigned src_bits)<br>
> > > {<br>
> > > - if (x == -MAX_INT(src_bits))<br>
> > > + if (x <= -MAX_INT(src_bits))<br>
> > > return -1.0f;<br>
> > > else<br>
> > > return x * (1.0f / (float)MAX_INT(src_bits));<br>
> > ><br>
> ><br>
> > _______________________________________________<br>
> > mesa-dev mailing list<br>
> > <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> > <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
> ><br>
> ><br>
> ><br>
><br>
><br>
</p>