From 5705b45b6a050f908120779e6049853931a8025a Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Tue, 27 Jul 2010 18:25:37 +0200 Subject: nv50: explicitly set src type for SET ops Need to do this more nicely for all ops. --- src/gallium/drivers/nv50/nv50_tgsi_to_nc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gallium/drivers/nv50') diff --git a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c index da7fe746f4..aafb5e8295 100644 --- a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c +++ b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c @@ -20,6 +20,8 @@ * SOFTWARE. */ +/* XXX: need to clean this up so we get the typecasting right more naturally */ + #include #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]); -- cgit v1.2.3