Displaying 3 results from an estimated 3 matches for "nv50_sreg4_map".
2009 Sep 12
0
[PATCH 11/13] nv50: add support for light-twoside
...6 +2736,15 @@ nv50_linkage_validate(struct nv50_context *nv50)
}
reg[0] += (m - 4) << 8; /* adjust BFC0 id */
+
+ /* if VP writes any back-face colour, use separate slots */
+ if (vp->cfg.two_side[0].mask | vp->cfg.two_side[1].mask) {
+ vpo = &vp->cfg.two_side[0];
+
+ m = nv50_sreg4_map(map, m, lin, &fp->cfg.two_side[0], &vpo[0]);
+ m = nv50_sreg4_map(map, m, lin, &fp->cfg.two_side[1], &vpo[1]);
+ }
+
reg[0] += m - 4; /* adjust FFC0 id */
reg[4] |= m << 8; /* set mid where 'normal' FP inputs start */
diff --git a/src/gallium/drivers/nv50/...
2009 Sep 12
0
[PATCH 10/13] nv50: proper linkage between VP and FP
...od(so, tesla, NV50TCL_FP_CTRL_UNK196C, 1);
- so_data (so, p->cfg.fp.regs[3]);
+ so_data (so, p->cfg.regs[3]);
so_method(so, tesla, NV50TCL_FP_START_ID, 1);
so_data (so, 0); /* program start offset */
so_ref(so, &nv50->state.fragprog);
so_ref(NULL, &so);
}
+static int
+nv50_sreg4_map(uint32_t *p_map, int mid, uint32_t lin[4],
+ struct nv50_sreg4 *fpi, struct nv50_sreg4 *vpo)
+{
+ int c;
+ uint8_t mv = vpo->mask, mf = fpi->mask, oid = vpo->hw_id;
+ uint8_t *map = (uint8_t *)p_map;
+
+ for (c = 0; c < 4; ++c) {
+ if (mf & 1) {
+ if (fpi->linear == TRU...
2009 Sep 12
0
[PATCH 13/13] nv50: add support for point sprites
...NE) {
+ m += n;
+ continue;
+ }
+ }
+
+ /* this is either PointCoord or replaced by sprite coords */
+ for (c = 0; c < 4; c++) {
+ if (!(fp->cfg.io[i].mask & (1 << c)))
+ continue;
+ pntc[m / 8] |= (c + 1) << ((m % 8) * 4);
+ ++m;
+ }
+ }
+}
+
static int
nv50_sreg4_map(uint32_t *p_map, int mid, uint32_t lin[4],
struct nv50_sreg4 *fpi, struct nv50_sreg4 *vpo)
@@ -2721,7 +2766,7 @@ nv50_linkage_validate(struct nv50_context *nv50)
struct nouveau_stateobj *so;
struct nv50_sreg4 dummy, *vpo;
int i, n, c, m = 0;
- uint32_t map[16], lin[4], reg[5];
+ uint...