search for: ctor_reg

Displaying 4 results from an estimated 4 matches for "ctor_reg".

2009 Sep 12
0
[PATCH 09/13] nv50: move allocation of pc regs
...(pc, &tok->FullInstruction); break; default: break; } } - if (pc->temp_nr) { - pc->temp = MALLOC(pc->temp_nr * 4 * sizeof(struct nv50_reg)); - if (!pc->temp) - goto out_err; - - for (i = 0; i < pc->temp_nr; i++) { - for (c = 0; c < 4; c++) { - ctor_reg(&pc->temp[i*4+c], P_TEMP, i, -1); - pc->temp[i*4+c].acc = r_usage[0][i*4+c]; - } - } - } - if (pc->attr_nr) { int oid = 4, mid = 4, aid = 0; /* oid = VP output id * aid = FP attribute/interpolant id * mid = VP output mapping field ID */ - - pc->attr = CALL...
2009 Jun 24
0
[PATCH] nv50: fix previous patches
...; 27); emit_interp(pc, pc->iv_c, NULL, INTERP_CENTROID); emit_flop(pc, 0, pc->iv_c, pc->iv_c); - pc->p->cfg.fp.regs[1] |= 0x08000000; } /* load colors directly after position - XXX: might @@ -2301,7 +2312,8 @@ nv50fp_move_outputs(struct nv50_pc *pc) ctor_reg(&out, P_TEMP, -1, -1); for (i = 0; i < pc->result_nr * 4; i++) { - if (pc->result[i].rhw < 0) + if (pc->result[i].rhw < 0 || + pc->result[i].rhw == pc->result[i].hw) continue; out.hw = pc->result[i].rhw; emit_mov(pc, &out, &pc->result[i...
2009 Jun 21
0
[PATCH] nv50: add support for two-sided lighting
...p += ((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 nv50_pc *pc) if (pc->p->type == PIPE_SHADER_VERTEX) { for (i = 0; i < nr; i++) ctor_reg(&pc->result[i], P_RESULT, i / 4, i); + + /* output id offset bcol from fcol */ + if (bcol[0] != 0xffff) + pc->p->cfg.vp.bcol = bcol[0] - fcol[0]; } else { /* pc->p->type == PIPE_SHADER_FRAGMENT */ for (i = 0; i < pc->result_nr; i++) { @@ -2101,7 +2119,7 @@...
2009 Sep 12
0
[PATCH 10/13] nv50: proper linkage between VP and FP
...nv50, struct nv50_program *p); /* nv50_state_validate.c */ diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c index c8157f1..feb1504 100644 --- a/src/gallium/drivers/nv50/nv50_program.c +++ b/src/gallium/drivers/nv50/nv50_program.c @@ -139,6 +139,14 @@ ctor_reg(struct nv50_reg *reg, unsigned type, int index, int hw) reg->acc = 0; } +static INLINE unsigned +popcnt4(uint32_t val) +{ + static const unsigned cnt[16] + = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 }; + return cnt[val & 0xf]; +} + static void alloc_reg(struct nv50_pc *pc, str...