From edf774bb7eae32f00b900a6faa9b5c698affdcaa Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 28 Jan 2016 16:45:58 +0100 Subject: [PATCH] nv50/ir: we can't do the add to mad conversion when the mul saturates Reviewed-by: Ilia Mirkin --- src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp index 35b1fa7795e..6192c0665e4 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -1635,6 +1635,9 @@ AlgebraicOpt::tryADDToMADOrSAD(Instruction *add, operation toOp) if (src->getUniqueInsn() && src->getUniqueInsn()->bb != add->bb) return false; + if (src->getInsn()->saturate) + return false; + if (src->getInsn()->postFactor) return false; if (toOp == OP_SAD) { -- 2.30.2