glsl/ir_builder: add fract.

Just add fract so we can use it later.

Signed-off-by: Dave Airlie <airlied@redhat.com>
glsl: add lowering pass for double operations

this lowers ceil, floor, trunc, round, and sign into operations based on
fract which some hw exposes.

Signed-off-by: Dave Airlie <airlied@redhat.com>

lower sign
st/tgsi: use glsl lowering pass to convert double ops.
st/tgsi: fix UCMP

this add ucmp to the f2d and dldexp exception, I think Ilia already
pointed this out and I missed it.
st/glsl: fix UCMP harder?
add missing break
st/glsl: cleanup code
glsl: fix lowering dfloor
glsl: fixup lowering of roundEven
glsl: add a lot more constant expression support for doubles
fix convert component - streams were reveresed
nvc0: make sure that the local memory allocation is aligned to 0x10

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: <mesa-stable@lists.freedesktop.org>
nv50/ir: keep track of whether the program uses fp64
nvc0: mark shader header if fp64 is used

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50/ir: fix hard-coded TYPE_U32 sized register

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50/ir: fix phi/union sources when their def has been merged

In a situation where double-register values are used, the phi nodes can
still end up being u32 values. They all get merged into one RA node
though. When fixing up the merge (which comes after the phi node), the
phi node's def would get fixed, but not its sources which would remain
at the low register value.

This maintains the invariant that a phi node's defs and sources are
allocated the same register.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
glsl: add a lowering pass for frexp with double arguments

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0/ir: add emission of dadd/dmul/dmad opcodes, fix minmax

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
gk110/ir: add emission of dadd/dmul/dmad opcodes

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0/ir: fix lowering of RSQ/RCP/SQRT/MOD to work with F64

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>