nvc0/ir: fix spilling predicates to registers
authorIlia Mirkin <imirkin@alum.mit.edu>
Mon, 30 May 2016 21:25:41 +0000 (17:25 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 30 May 2016 22:15:14 +0000 (18:15 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: "11.1 11.2 12.0" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp

index 9159e3421934df1c01649f4848076640cdaa22c2..bc94285120e1a78caffe89a016905ede5e12b9e8 100644 (file)
@@ -1985,6 +1985,10 @@ CodeEmitterNVC0::emitMOV(const Instruction *i)
          opc |= i->lanes << 5;
 
       emitForm_B(i, opc);
+
+      // Explicitly emit the predicate source as emitForm_B skips it.
+      if (i->src(0).getFile() == FILE_PREDICATE)
+         srcId(i->src(0), 20);
    } else {
       uint32_t imm;