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-31 19:17:46 +0200
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-09-01 18:02:50 +0200
commit6f9978050eb8648888a728fc09b99e279c2b7b15 (patch)
tree5ecf5bdf5e12a024dff759a120eb0d93fb771d00 /src/gallium/drivers/nv50/nv50_pc_emit.c
parent07fe7c2f02dbf4e0c385aaf3f21ee858f0ae974c (diff)
nv50: re-add proper TEXBIAS sequence
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_pc_emit.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_pc_emit.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/gallium/drivers/nv50/nv50_pc_emit.c b/src/gallium/drivers/nv50/nv50_pc_emit.c
index e1d7bc6459..bb0a6f32d1 100644
--- a/src/gallium/drivers/nv50/nv50_pc_emit.c
+++ b/src/gallium/drivers/nv50/nv50_pc_emit.c
@@ -540,8 +540,9 @@ emit_mov(struct nv_pc *pc, struct nv_instruction *i)
set_a16_bits(pc, SREG(i->src[0])->id);
} else
if (DFILE(i, 0) == NV_FILE_FLAGS) {
- pc->emit[0] = 0x000001fd;
- pc->emit[1] = 0xa0000788 | (1 << 6);
+ pc->emit[0] = 0x00000001;
+ pc->emit[1] = 0xa0000000 | (1 << 6);
+ set_pred(pc, i);
pc->emit[0] |= SREG(i->src[0])->id << 9;
pc->emit[1] |= DREG(i->def[0])->id << 4;
} else
@@ -984,7 +985,7 @@ emit_tex(struct nv_pc *pc, struct nv_instruction *i)
pc->emit[0] |= i->tex_t << 9;
pc->emit[0] |= i->tex_s << 17;
- pc->emit[0] |= i->tex_argc << 22;
+ pc->emit[0] |= (i->tex_argc - 1) << 22;
pc->emit[0] |= (i->tex_mask & 0x3) << 25;
pc->emit[1] |= (i->tex_mask & 0xc) << 12;
@@ -1000,8 +1001,6 @@ emit_tex(struct nv_pc *pc, struct nv_instruction *i)
else
if (i->opcode == NV_OP_TXL)
pc->emit[1] |= 0x40000000;
- else
- pc->emit[0] -= 1 << 22;
}
static void
@@ -1053,6 +1052,20 @@ emit_ddy(struct nv_pc *pc, struct nv_instruction *i)
set_pred_wr(pc, i);
}
+static void
+emit_quadop(struct nv_pc *pc, struct nv_instruction *i)
+{
+ pc->emit[0] = 0xc0000000;
+ pc->emit[1] = 0x80000000;
+
+ emit_form_ADD(pc, i);
+
+ pc->emit[0] |= i->lanes << 16;
+
+ pc->emit[0] |= (i->quadop & 0x03) << 20;
+ pc->emit[1] |= (i->quadop & 0xfc) << 20;
+}
+
void
nv50_emit_instruction(struct nv_pc *pc, struct nv_instruction *i)
{
@@ -1132,6 +1145,9 @@ nv50_emit_instruction(struct nv_pc *pc, struct nv_instruction *i)
case NV_OP_TXL:
emit_tex(pc, i);
break;
+ case NV_OP_QUADOP:
+ emit_quadop(pc, i);
+ break;
case NV_OP_KIL:
emit_flow(pc, i, 0x0);
break;
@@ -1162,7 +1178,7 @@ nv50_emit_instruction(struct nv_pc *pc, struct nv_instruction *i)
case NV_OP_UNDEF:
case NV_OP_SUB:
NOUVEAU_ERR("operation \"%s\" should have been eliminated\n",
- nv_opcode_name(i->opcode));
+ nv_opcode_name(i->opcode));
break;
default:
NOUVEAU_ERR("unhandled NV_OP: %d\n", i->opcode);