nvc0/ir: fix emission of predicate spill to register
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 29 May 2016 13:58:40 +0000 (09:58 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 30 May 2016 14:07:01 +0000 (10:07 -0400)
The lane mask only applies to real mov's, while here we're using PSET.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp

index 1bb962f9e26310a9cf192205fa6a6f7435d4fb15..9159e3421934df1c01649f4848076640cdaa22c2 100644 (file)
@@ -1981,7 +1981,8 @@ CodeEmitterNVC0::emitMOV(const Instruction *i)
       else
          opc = HEX64(28000000, 00000004);
 
-      opc |= i->lanes << 5;
+      if (i->src(0).getFile() != FILE_PREDICATE)
+         opc |= i->lanes << 5;
 
       emitForm_B(i, opc);
    } else {