nvc0/ir: fix emission of cvt when register and type size differ

This commit is contained in:
Christoph Bumiller
2011-10-06 14:32:58 +02:00
parent 37a08ddce5
commit 7920c3c192
@@ -785,8 +785,9 @@ CodeEmitterNVC0::emitCVT(Instruction *i)
roundMode_C(i);
code[0] |= util_logbase2(i->def[0].getSize()) << 20;
code[0] |= util_logbase2(i->src[0].getSize()) << 23;
// cvt u16 f32 sets high bits to 0, so we don't have to use Value::Size()
code[0] |= util_logbase2(typeSizeof(i->dType)) << 20;
code[0] |= util_logbase2(typeSizeof(i->sType)) << 23;
if (sat)
code[0] |= 0x20;