summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_emit.c
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-03-06 14:07:48 -0700
committerBrian <brian@yutani.localnet.net>2007-03-06 14:07:48 -0700
commite10a1457e827f9cfb18a4438f3254151ddf1d60b (patch)
tree3f7334c9d33bcec668549858cb3ee182e9e2ff7b /src/mesa/shader/slang/slang_emit.c
parent28ab1125c22bcb558e3b5e127d975120de76e103 (diff)
fix some int arithmetic problems
Diffstat (limited to 'src/mesa/shader/slang/slang_emit.c')
-rw-r--r--src/mesa/shader/slang/slang_emit.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 9ead896142..9532e070f7 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -1482,9 +1482,13 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n)
return emit_swizzle(emitInfo, n);
case IR_I_TO_F:
- {
- n->Store = n->Children[0]->Store;
- }
+ /* just move */
+ emit(emitInfo, n->Children[0]);
+ inst = new_instruction(emitInfo, OPCODE_MOV);
+ storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask);
+ storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store);
+ if (emitInfo->EmitComments)
+ inst->Comment = _mesa_strdup("int to float");
return NULL;
/* Simple arithmetic */