[Mesa-dev] [PATCH] r600g: Add support for ROUND

Jose Fonseca jfonseca at vmware.com
Sun Aug 7 17:24:44 PDT 2011


----- Original Message -----
> On Sun, 7 Aug 2011 19:22:06 +0200
> Henri Verbeet <hverbeet at gmail.com> wrote:
> 
> > On 7 August 2011 19:03, Lauri Kasanen <cand at gmx.com> wrote:
> > > +       /* floor(a + 0.5) */
> > Why not use RNDNE?
> 
> I feel it would cause more "wrong" results, with two numbers
> resolving to the same (3.5 = 4.5 = 4).

There's no "wrong" or "right" when there are two equidistant integers -- it's all a matter of convention.

Also, llvmpipe uses ROUNDPS which follows the "round to even" rule for *.5 values too.

IMHO, if there's a hardware opcode for round then it should be used until there's conclusive evidence against it.

Jose


More information about the mesa-dev mailing list