summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2016-02-04 22:58:48 -0500
committerEmil Velikov <emil.l.velikov@gmail.com>2016-02-24 17:34:42 +0000
commit88615b66ed1ee97bb45480401489ab1d144ff9ef (patch)
treeb5c6915ddec6744ccdff99ffa2425deb9f40ca41 /src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
parenta2dd9b49f0c01f0c2005e504fff496b5f5433ccf (diff)
nvc0/ir: fix converting between predicate and gpr
The spill logic will insert convert ops when moving between files. It seems like the emission logic wasn't quite ready for these converts. Tested on fermi, and visually looked at nvdisasm output for maxwell. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 1a0fde1f52c59e0dbada03f387c8e25d9475ebbe)
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
index 037267e8390..0631778bddc 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
@@ -1825,10 +1825,16 @@ CodeEmitterGK110::emitInstruction(Instruction *insn)
case OP_CEIL:
case OP_FLOOR:
case OP_TRUNC:
- case OP_CVT:
case OP_SAT:
emitCVT(insn);
break;
+ case OP_CVT:
+ if (insn->def(0).getFile() == FILE_PREDICATE ||
+ insn->src(0).getFile() == FILE_PREDICATE)
+ emitMOV(insn);
+ else
+ emitCVT(insn);
+ break;
case OP_RSQ:
emitSFnOp(insn, 5 + 2 * insn->subOp);
break;