summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50/nv50_pc_emit.c
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-08-17 11:51:51 +0200
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-08-17 13:08:52 +0200
commitce1629564d1cce80b2762d266640e3181a68e848 (patch)
tree56b18f99238ad4deb78d3f0247d6db3866255826 /src/gallium/drivers/nv50/nv50_pc_emit.c
parent62f933a6f617050a267079b27360eaae2d0e1a70 (diff)
nv50: more TGSI opcodes (SIN, SCS, ARL, RET, KILP)
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_pc_emit.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_pc_emit.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_pc_emit.c b/src/gallium/drivers/nv50/nv50_pc_emit.c
index 3a3b277c13..b5f4383aa1 100644
--- a/src/gallium/drivers/nv50/nv50_pc_emit.c
+++ b/src/gallium/drivers/nv50/nv50_pc_emit.c
@@ -748,8 +748,30 @@ emit_bitop2(struct nv_pc *pc, struct nv_instruction *i)
}
static void
+emit_arl(struct nv_pc *pc, struct nv_instruction *i)
+{
+ assert(SFILE(i, 0) == NV_FILE_GPR);
+ assert(SFILE(i, 1) == NV_FILE_IMM);
+
+ assert(!i->flags_def);
+
+ pc->emit[0] = 0x00000001;
+ pc->emit[1] = 0xc0000000;
+
+ set_dst(pc, i->def[0]);
+ set_pred(pc, i);
+ set_src_0(pc, i->src[0]);
+ pc->emit[0] |= (get_immd_u32(i->src[1]) & 0x3f) << 16;
+}
+
+static void
emit_shift(struct nv_pc *pc, struct nv_instruction *i)
{
+ if (DFILE(i, 0) == NV_FILE_ADDR) {
+ emit_arl(pc, i);
+ return;
+ }
+
pc->emit[0] = 0x30000001;
pc->emit[1] = 0xc4000000;