nv50/ir: disable tryCollapseChainedMULs in ConstantFolding for precise instructions
authorKarol Herbst <kherbst@redhat.com>
Thu, 17 Jan 2019 22:32:19 +0000 (23:32 +0100)
committerKarol Herbst <kherbst@redhat.com>
Fri, 18 Jan 2019 01:03:30 +0000 (02:03 +0100)
fixes dEQP-GLES2.functional.shaders.invariance.mediump.loop_3

CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp

index 5d3b4aba9cce0e86c09912f59bfdfa77f69908c7..0b3220903b9f33bcfa488183bb06736c42dd2ca1 100644 (file)
@@ -1045,7 +1045,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
       break;
    }
    case OP_MUL:
-      if (i->dType == TYPE_F32)
+      if (i->dType == TYPE_F32 && !i->precise)
          tryCollapseChainedMULs(i, s, imm0);
 
       if (i->subOp == NV50_IR_SUBOP_MUL_HIGH) {