search for: free_temp

Displaying 7 results from an estimated 7 matches for "free_temp".

2009 May 06
2
nv50: shader generation patches
Hi ! I've been trying to improve NV50 shader generation a bit the last couple of weeks, so here is what I've produced. I don't know if it's usable for you or just a pile of horrible hacks, but at least it makes some mesa demos render more correcly, p.e. the teapot (aside from mip-mapping issues of the floor texture), arbfplight, and I think the gears also didn't appear as they
2009 Sep 12
0
[PATCH 10/13] nv50: proper linkage between VP and FP
....io[n++].tgsi_id = i + tgsi_off; } + } - for (i = ((fcrd < 0x40) ? 1 : 0); i < pc->attr_nr; i++) - load_fp_attrib(pc, i, &mid, &aid, &oid); + /* now load the interpolants */ + aid = tgsi_off ? popcnt4(p->cfg.regs[1] >> 24) : 0; - if (pc->iv_p) - free_temp(pc, pc->iv_p); - if (pc->iv_c) - free_temp(pc, pc->iv_c); + for (i = 0; i < pc->attr_nr; ++i) { + p->cfg.io[i].hw_id = aid; - pc->p->cfg.fp.high_map = (mid / 4); - pc->p->cfg.fp.high_map += ((mid % 4) ? 1 : 0); - } else { - /* vertex program */ - for...
2009 Jun 21
0
[PATCH] nv50: initial support for IF, ELSE, ENDIF insns
...discarded temporary register src + * to the tgsi register dst and free src. + */ +static void +assimilate_temp(struct nv50_pc *pc, struct nv50_reg *dst, struct nv50_reg *src) +{ + assert(src->index == -1 && src->hw != -1); + + if (pc->if_lvl > 0) { + emit_mov(pc, dst, src); + free_temp(pc, src); + return; + } + + if (dst->hw != -1) + pc->r_temp[dst->hw] = NULL; + pc->r_temp[src->hw] = dst; + dst->hw = src->hw; + + FREE(src); +} + static boolean check_swap_src_0_1(struct nv50_pc *pc, struct nv50_reg **s0, struct nv50_reg **s1) @@ -866,6 +885,8 @@ emi...
2009 Sep 10
0
[PATCH 06/13] nv50: handle SEQ, SGT, SLE, SNE opcodes
...e->inst[1] = 0x64014780; - set_dst(pc, rdst, e); - set_src_0(pc, dst, e); emit(pc, e); - if (dst != rdst) + /* cvt.f32.u32/s32 (?) if we didn't only write the predicate */ + if (rdst) + emit_cvt(pc, rdst, dst, -1, CVTOP_ABS | CVTOP_RN, CVT_F32_S32); + if (rdst && rdst != dst) free_temp(pc, dst); } +static INLINE unsigned +map_tgsi_setop_cc(unsigned op) +{ + switch (op) { + case TGSI_OPCODE_SLT: return 0x1; + case TGSI_OPCODE_SGE: return 0x6; + case TGSI_OPCODE_SEQ: return 0x2; + case TGSI_OPCODE_SGT: return 0x4; + case TGSI_OPCODE_SLE: return 0x3; + case TGSI_OPCODE_SNE: retur...
2009 Jun 21
0
[PATCH] nv50: support for SLE, SNE, SEQ, SGT
...] |= 0x00000008; + } + set_src_0(pc, src0, e); set_src_1(pc, src1, e); - emit(pc, e); - /* cvt.f32.u32 */ - e = exec(pc); - e->inst[0] = 0xa0000001; - e->inst[1] = 0x64014780; - set_dst(pc, rdst, e); - set_src_0(pc, dst, e); emit(pc, e); - pc->if_cond = e; - if (dst != rdst) - free_temp(pc, dst); + if (rdst) + emit_cvt(pc, rdst, -1, dst, CVTOP_ABSRN, CVT_F32_S32); } static INLINE void emit_flr(struct nv50_pc *pc, struct nv50_reg *dst, struct nv50_reg *src) { - emit_cvt(pc, dst, src, -1, CVTOP_FLOOR, CVT_F32_F32_ROP); + emit_cvt(pc, dst, -1, src, CVTOP_FLOOR, CVT_F32_F32_ROP...
2009 Jun 21
0
[PATCH] nv50: add support for two-sided lighting
...+ /* reset oid and load remaining attrs */ + oid = (fcrd == 0xffff) ? 4 : 0; for (i = 0; i < pc->attr_nr; i++) load_fp_attrib(pc, i, r_usage[1], &mid, &aid, &oid); @@ -1985,8 +2000,7 @@ nv50_program_tx_prep(struct nv50_pc *pc) if (pc->iv_c) free_temp(pc, pc->iv_c); - pc->p->cfg.fp.high_map = (mid / 4); - pc->p->cfg.fp.high_map += ((mid % 4) ? 1 : 0); + pc->p->cfg.fp.high_map = mid; } else { /* vertex program */ for (i = 0; i < pc->attr_nr; i++) { @@ -2011,6 +2025,10 @@ nv50_program_tx_prep(struct nv...
2009 Sep 12
0
[PATCH 09/13] nv50: move allocation of pc regs
...00010000; } - for (i = 0; i < pc->attr_nr; i++) - load_fp_attrib(pc, i, r_usage[1], - &mid, &aid, &oid); + for (i = ((fcrd < 0x40) ? 1 : 0); i < pc->attr_nr; i++) + load_fp_attrib(pc, i, &mid, &aid, &oid); if (pc->iv_p) free_temp(pc, pc->iv_p); @@ -2253,48 +2173,26 @@ nv50_program_tx_prep(struct nv50_pc *pc) for (i = 0; i < pc->attr_nr * 4; i++) { pc->p->cfg.vp.attr[aid / 32] |= (1 << (aid % 32)); - ctor_reg(&pc->attr[i], P_ATTR, i / 4, aid++); + pc->attr[i].hw = aid++;...