[Mesa-dev] [PATCH] glsl: add ir_unop_b2d

Iago Toral itoral at igalia.com
Tue Jan 12 23:43:08 PST 2016


On Tue, 2016-01-12 at 12:41 -0500, Ilia Mirkin wrote:
> On Tue, Jan 12, 2016 at 12:33 PM, Ian Romanick <idr at freedesktop.org> wrote:
> > On 01/12/2016 07:29 AM, Ilia Mirkin wrote:
> >> IIRC this should come out as b2i + i2d. You should be able to test this
> >> with llvmpipe/softpipe, which support fp64.
> >
> > Either that or b2f + f2d.  I remember there being discussion about this
> > topic when Dave first sent out the fp64 patches.  I thought we decided
> > against a b2d opcode.
> 
> Yeah, I didn't actually check. I hope it's b2i + i2d though since that
> could be done in one op on NVIDIA :)

Just tested this with i965 and it seems to be b2f + f2d

>  Oh, and to pre-empt the question,
> the reason why there's a d2b is that doubles can represent numbers
> smaller than float, so d2f might come out as 0 even though the double
> != 0. However no such problem exists in the reverse direction.

Makes sense, thanks for the explanation ilia!

Iago



More information about the mesa-dev mailing list