nv50: explicitly set src type for SET ops
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 27 Jul 2010 16:25:37 +0000 (18:25 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 31 Jul 2010 16:32:35 +0000 (18:32 +0200)
Need to do this more nicely for all ops.

src/gallium/drivers/nv50/nv50_tgsi_to_nc.c

index da7fe746f49967a90ac2956b6af135a35779bcbe..aafb5e8295535de066b04f098b71ddf2cd91b859 100644 (file)
@@ -20,6 +20,8 @@
  * SOFTWARE.
  */
 
+/* XXX: need to clean this up so we get the typecasting right more naturally */
+
 #include <unistd.h>
 
 #include "nv50_context.h"
@@ -1173,6 +1175,10 @@ bld_instruction(struct bld_context *bld,
          dst0[c]->insn->set_cond = translate_setcc(insn->Instruction.Opcode);
          dst0[c]->reg.type = infer_dst_type(insn->Instruction.Opcode);
 
+         dst0[c]->insn->src[0]->typecast =
+         dst0[c]->insn->src[1]->typecast =
+            infer_src_type(insn->Instruction.Opcode);
+
          if (dst0[c]->reg.type != NV_TYPE_F32)
             break;
          dst0[c] = bld_insn_1(bld, NV_OP_ABS, dst0[c]);