nv50/ir: handle NEG,ABS modifiers for short RCP encoding
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 14 Jun 2012 21:24:36 +0000 (23:24 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 14 Jun 2012 21:25:48 +0000 (23:25 +0200)
src/gallium/drivers/nv50/codegen/nv50_ir_emit_nv50.cpp

index 7542b84d17aaab9b75b0923971bd4199df5a6cfd..3ea89aefd2aba9b2c97a424db932a91429a69fc6 100644 (file)
@@ -1239,6 +1239,8 @@ CodeEmitterNV50::emitSFnOp(const Instruction *i, uint8_t subOp)
 
    if (i->encSize == 4) {
       assert(i->op == OP_RCP);
+      code[0] |= i->src(0).mod.abs() << 15;
+      code[0] |= i->src(0).mod.neg() << 22;
       emitForm_MUL(i);
    } else {
       code[1] = subOp << 29;