[Mesa-dev] [PATCH 2/2] nv50/ir: we can't do the add to mad conversion when the mul saturates

Karol Herbst nouveau at karolherbst.de
Mon Feb 1 01:02:35 PST 2016


---
 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 1d04a6d..7e58328 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.7.0



More information about the mesa-dev mailing list