nv50/ir/emit: don't forget saturation bit on f32 add immediate
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 18 Aug 2012 15:30:50 +0000 (17:30 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 18 Aug 2012 15:38:45 +0000 (17:38 +0200)
Solved by Maxim Levitsky on IRC.

src/gallium/drivers/nv50/codegen/nv50_ir_emit_nv50.cpp

index 3ea89aefd2aba9b2c97a424db932a91429a69fc6..bc4657c13b6b299b7b1f3ad1c7c7358b2bde53e3 100644 (file)
@@ -893,6 +893,8 @@ CodeEmitterNV50::emitFADD(const Instruction *i)
       emitForm_IMM(i);
       code[0] |= neg0 << 15;
       code[0] |= neg1 << 22;
+      if (i->saturate)
+         code[0] |= 1 << 8;
    } else
    if (i->encSize == 8) {
       code[1] = 0;