nv50/ir/gk110: add postfactor support for fmul
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 15 Mar 2014 16:42:51 +0000 (12:42 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 18 Mar 2014 09:56:55 +0000 (05:56 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp

index 81134a212127656dff986759fb126a1f482eb9ff..584ae4c587e7840267915ef5b8bd0712d9bc7125 100644 (file)
@@ -489,6 +489,8 @@ CodeEmitterGK110::emitFMUL(const Instruction *i)
       assert(i->postFactor == 0);
    } else {
       emitForm_21(i, 0x234, 0xc34);
+      code[1] |= ((i->postFactor > 0) ?
+                  (7 - i->postFactor) : (0 - i->postFactor)) << 12;
 
       RND_(2a, F);
       FTZ_(2f);