diff options
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp index df83f18ae83..dac3e6f814c 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -1677,7 +1677,8 @@ AlgebraicOpt::handleADD(Instruction *add) return false; bool changed = false; - if (!changed && prog->getTarget()->isOpSupported(OP_MAD, add->dType)) + // we can't optimize to MAD if the add is precise + if (!add->precise && prog->getTarget()->isOpSupported(OP_MAD, add->dType)) changed = tryADDToMADOrSAD(add, OP_MAD); if (!changed && prog->getTarget()->isOpSupported(OP_SAD, add->dType)) changed = tryADDToMADOrSAD(add, OP_SAD); @@ -1713,7 +1714,7 @@ AlgebraicOpt::tryADDToMADOrSAD(Instruction *add, operation toOp) return false; if (src->getInsn()->saturate || src->getInsn()->postFactor || - src->getInsn()->dnz) + src->getInsn()->dnz || src->getInsn()->precise) return false; if (toOp == OP_SAD) { |