static void
emit_interp(struct nv50_pc *pc, struct nv50_reg *dst,
- struct nv50_reg *src, struct nv50_reg *iv, boolean noperspective)
+ struct nv50_reg *src, struct nv50_reg *iv)
{
struct nv50_program_exec *e = exec(pc);
e->inst[0] |= 0x80000000;
set_dst(pc, dst, e);
- alloc_reg(pc, iv);
- e->inst[0] |= (iv->hw << 9);
alloc_reg(pc, src);
e->inst[0] |= (src->hw << 16);
- if (noperspective)
+ if (iv) {
e->inst[0] |= (1 << 25);
+ alloc_reg(pc, iv);
+ e->inst[0] |= (iv->hw << 9);
+ }
emit(pc, e);
}
emit_mov(pc, t1, src[0][1]);
e = exec(pc);
- e->inst[0] = 0xf0400000;
+ e->inst[0] = 0xf6400000;
set_long(pc, e);
e->inst[1] |= 0x0000c004;
set_dst(pc, t0, e);
if (pc->p->type == PIPE_SHADER_FRAGMENT) {
iv = alloc_temp(pc, NULL);
- emit_interp(pc, iv, iv, iv, FALSE);
+ emit_interp(pc, iv, iv, NULL);
emit_flop(pc, 0, iv, iv);
aid++;
}
if (pc->p->type != PIPE_SHADER_FRAGMENT)
continue;
- emit_interp(pc, &a[0], &a[0], iv, TRUE);
- emit_interp(pc, &a[1], &a[1], iv, TRUE);
- emit_interp(pc, &a[2], &a[2], iv, TRUE);
- emit_interp(pc, &a[3], &a[3], iv, TRUE);
+ emit_interp(pc, &a[0], &a[0], iv);
+ emit_interp(pc, &a[1], &a[1], iv);
+ emit_interp(pc, &a[2], &a[2], iv);
+ emit_interp(pc, &a[3], &a[3], iv);
}
if (iv)