diff options
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp index ae739eeda83..ad9bf6f4aa9 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -608,9 +608,12 @@ ConstantFolding::expr(Instruction *i, case OP_FMA: { i->op = OP_ADD; + /* Move the immediate to the second arg, otherwise the ADD operation + * won't be emittable + */ i->setSrc(1, i->getSrc(0)); - i->src(1).mod = i->src(2).mod; i->setSrc(0, i->getSrc(2)); + i->src(0).mod = i->src(2).mod; i->setSrc(2, NULL); ImmediateValue src0; |