nvc0/ir: Use double constant in handleSQRT
authorPierre Moreau <pierre.morrow@free.fr>
Sat, 19 Mar 2016 16:56:03 +0000 (17:56 +0100)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 19 Mar 2016 19:59:52 +0000 (15:59 -0400)
Fixes: a100d89d0998 (nv50,nvc0: Fix invalid constant.)
Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp

index 6f1ebef74fb552cde04cfe413016677fd2e49596..c88a2695a4ce67399571e16d1b24604b1f0018f4 100644 (file)
@@ -1782,7 +1782,7 @@ NVC0LoweringPass::handleSQRT(Instruction *i)
 {
    if (i->dType == TYPE_F64) {
       Value *pred = bld.getSSA(1, FILE_PREDICATE);
-      Value *zero = bld.loadImm(NULL, 0);
+      Value *zero = bld.loadImm(NULL, 0.0);
       Value *dst = bld.getSSA(8);
       bld.mkOp1(OP_RSQ, i->dType, dst, i->getSrc(0));
       bld.mkCmp(OP_SET, CC_LE, i->dType, pred, i->dType, i->getSrc(0), zero);