[Mesa-dev] [PATCH] glsl: add ir_unop_b2d
Dave Airlie
airlied at gmail.com
Tue Jan 12 21:28:25 PST 2016
On 13 January 2016 at 03:41, Ilia Mirkin <imirkin at alum.mit.edu> 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 :) 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.
It's b2f + f2d from looking at ast_function.cpp.
Dave.
More information about the mesa-dev
mailing list