search for: so_ref

Displaying 16 results from an estimated 16 matches for "so_ref".

Did you mean: bo_ref
2009 Dec 21
2
[PATCH 1/2] Unreference state/buffer objects on context/screen destruction
...+ if (screen->constbuf_misc[0]) + nouveau_bo_ref(NULL, &screen->constbuf_misc[0]); + if (screen->tic) + nouveau_bo_ref(NULL, &screen->tic); + if (screen->tsc) + nouveau_bo_ref(NULL, &screen->tsc); + if (screen->static_init) + so_ref(NULL, &screen->static_init); + nouveau_notifier_free(&screen->sync); nouveau_grobj_free(&screen->tesla); nouveau_grobj_free(&screen->eng2d); Index: nv50/nv50_context.c =================================================================== --- nv50/nv50_context.c (w...
2009 Dec 21
1
Clean up of nv40_context->state.hw and nv40_screen->state
...screen.c (wersja 32083) +++ nv40_screen.c (kopia robocza) @@ -140,7 +140,13 @@ nv40_screen_destroy(struct pipe_screen *pscreen) { struct nv40_screen *screen = nv40_screen(pscreen); + unsigned i; + for (i = 0; i < NV40_STATE_MAX; i++) { + if (screen->state[i]) + so_ref(NULL, &screen->state[i]); + } + nouveau_resource_free(&screen->vp_exec_heap); nouveau_resource_free(&screen->vp_data_heap); nouveau_resource_free(&screen->query_heap); Index: nv40_context.c =================================================================== -...
2009 Mar 31
1
(patch) Gallium NV50: honor bypass_vs_clip_and_viewport
...date(struct nv50_context *nv50) } scissor_uptodate: - if (nv50->dirty & NV50_NEW_VIEWPORT) { + if (nv50->dirty & (NV50_NEW_VIEWPORT | NV50_NEW_RASTERIZER)) { unsigned bypass; if (!nv50->rasterizer->pipe.bypass_vs_clip_and_viewport) @@ -281,6 +281,7 @@ scissor_uptodate: so_ref(so, &nv50->state.viewport); so_ref(NULL, &so); + nv50->state.dirty |= NV50_NEW_VIEWPORT; } viewport_uptodate:
2009 Oct 10
0
[PATCH 1/7] nv50: use SIFC for TIC, TSC upload
...(0) | (2<<29), 8); + so_method(so, eng2d, NV50_2D_SIFC_DATA | (2 << 29), 8); so_datap (so, nv50->sampler[i]->tsc, 8); } + + so_method(so, tesla, 0x1440, 1); /* sync SIFC */ + so_data (so, 0); + so_method(so, tesla, 0x1334, 1); /* flush TSC */ + so_data (so, 0); + so_ref(so, &nv50->state.tsc_upload); so_ref(NULL, &so); } @@ -383,3 +394,33 @@ viewport_uptodate: return TRUE; } +void nv50_so_init_sifc(struct nv50_context *nv50, + struct nouveau_stateobj *so, + struct nouveau_bo *bo, unsigned reloc, unsigned size) +{ + struct nouvea...
2009 Sep 12
0
[PATCH 13/13] nv50: add support for point sprites
...ons(-) diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c index cf57d5c..883c28b 100644 --- a/src/gallium/drivers/nv50/nv50_program.c +++ b/src/gallium/drivers/nv50/nv50_program.c @@ -2689,6 +2689,51 @@ nv50_fragprog_validate(struct nv50_context *nv50) so_ref(NULL, &so); } +static void +nv50_pntc_replace(struct nv50_context *nv50, uint32_t pntc[8], unsigned base) +{ + struct nv50_program *fp = nv50->fragprog; + struct nv50_program *vp = nv50->vertprog; + unsigned i, c, m = base; + + /* XXX: This can't work correctly in all cases yet, we...
2009 Jun 24
0
[PATCH] nv50: fix previous patches
...->p->type == PIPE_SHADER_VERTEX) + if (pc->p->type == PIPE_SHADER_VERTEX && pc->p->cfg.vp.ucp.nr > 0) nv50vp_ucp_append(pc); /* collect branching instructions, we need to adjust their target @@ -2811,14 +2823,26 @@ nv50_linkage_create(struct nv50_context *nv50) so_ref(so, &ln->so); so_ref(NULL, &so); +#ifdef NV50_PROGRAM_DUMP + fprintf(stderr, "LINKAGE:\n"); + for (i = 0; i < n; i++) + fprintf(stderr, "MAP[%i] = 0x%08x\n",i,map[i]); + fprintf(stderr, "REG1904 = 0x%08x\n",regs[0]); + fprintf(stderr, "REG1908 =...
2009 May 08
0
[PATCH] gallium/nv50: fix multi-texturing
...tree_nr; unit++) { + so_method(so, tesla, 0x1458, 1); + so_data (so, (unit << 9) | (unit << 1) | 1); + } + for (; unit < nv50->texbind_nr; unit++) { + so_method(so, tesla, 0x1458, 1); + so_data (so, (unit << 1) | 0); + } + nv50->texbind_nr = nv50->miptree_nr; + so_ref(so, &nv50->state.tic_upload); so_ref(NULL, &so); } -------------------------------------
2009 Jul 28
0
[PATCH 2/8] nv50: fix viewport transform
...so_data (so, fui(y_translate)); + so_data (so, fui(0.0f)); + so_method(so, tesla, NV50TCL_VIEWPORT_SCALE(0), 3); + so_data (so, fui(1.0f)); + so_data (so, fui(-1.0f)); + so_data (so, fui(1.0f)); } + so_method(so, tesla, NV50TCL_VIEWPORT_TRANSFORM_EN, 1); + so_data (so, 1); so_ref(so, &nv50->state.viewport); so_ref(NULL, &so); -- 1.6.3.3 --------------030109060900080900080804 Content-Type: text/plain; name="0003-nv50-fix-sx-dx-typo-in-transfer_rect_m2mf.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename*0="0003-nv50...
2009 Sep 12
0
[PATCH 10/13] nv50: proper linkage between VP and FP
...- so_data (so, p->cfg.fp.regs[2]); + so_data (so, p->cfg.regs[2]); so_method(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...
2009 Jul 12
0
[PATCH 2/3] nv50: fix viewport transform
..._data (so, fui(viewp.translate[0])); + so_data (so, fui(viewp.translate[1])); + so_data (so, fui(viewp.translate[2])); + so_method(so, tesla, NV50TCL_VIEWPORT_UNK0(0), 3); + so_data (so, fui(viewp.scale[0])); + so_data (so, fui(viewp.scale[1])); + so_data (so, fui(viewp.scale[2])); + so_ref(so, &nv50->state.viewport); so_ref(NULL, &so); nv50->state.dirty |= NV50_NEW_VIEWPORT; -- 1.6.3.3 --------------050205000506050205030809 Content-Type: text/plain; name="0003-nv50-invert-y-coordinates-in-transfers-if-needed.patch" Content-Transfer-Encoding: 7bit Con...
2009 Jun 21
0
[PATCH] nv50: add support for two-sided lighting
...(so, p->cfg.vp.attr[1]); so_method(so, tesla, 0x16b8, 1); so_data (so, p->cfg.high_result); - so_method(so, tesla, 0x16ac, 2); - so_data (so, p->cfg.high_result); //8); - so_data (so, p->cfg.high_temp); so_method(so, tesla, 0x140c, 1); so_data (so, p->code->start); so_ref(so, &nv50->state.vertprog); @@ -2410,7 +2425,6 @@ nv50_fragprog_validate(struct nv50_context *nv50) struct nouveau_grobj *tesla = nv50->screen->tesla; struct nv50_program *p = nv50->fragprog; struct nouveau_stateobj *so; - unsigned i; if (!p->translated) { nv50_progr...
2009 Oct 14
0
[PATCH 3/7] nv50: submit user vbo data through the fifo
...NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RD | NOUVEAU_BO_LOW, 0, 0); } + for (; i < n_ve; ++i) { + so_data (vtxfmt, 0x7e080010); + + so_method(vtxbuf, tesla, NV50TCL_VERTEX_ARRAY_FORMAT(i), 1); + so_data (vtxbuf, 0); + } + nv50->state.vtxelt_nr = nv50->vtxelt_nr; so_ref (vtxfmt, &nv50->state.vtxfmt); so_ref (vtxbuf, &nv50->state.vtxbuf); @@ -394,3 +450,320 @@ nv50_vbo_validate(struct nv50_context *nv50) so_ref (NULL, &vtxattr); } +typedef void (*pfn_push)(struct nouveau_channel *, void *); + +struct nv50_vbo_emitctx +{ + pfn_push push[16];...
2010 Jan 18
1
[PATCH 1/2] nv30-nv40: Rewrite primitive splitting and emission
The current code for primitive splitting and emission on pre-nv50 is severely broken. In particular: 1. Quads and lines are totally broken because "&= 3" should be "&= ~3" and similar for lines 2. Triangle fans and polygons are broken because the first vertex must be repeated for each split chunk 3. Line loops are broken because the must be converted to a line strip,
2009 Dec 20
1
[PATCH] nv50: remove vtxbuf stateobject after a referenced vtxbuf is mapped
...& PIPE_BUFFER_USAGE_VERTEX)) + return 0; + + /* Our vtxbuf got mapped, it can no longer be considered part of current + * state, remove it to avoid emitting reloc markers. + */ + if (ctx && ctx->state.vtxbuf && so_bo_is_reloc(ctx->state.vtxbuf, + nouveau_bo(pb))) { + so_ref(NULL, &ctx->state.vtxbuf); + ctx->state.dirty |= NV50_NEW_ARRAYS; + } + + return 0; +} + struct pipe_screen * nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev) { @@ -201,6 +223,7 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev) pscreen-&...
2009 Dec 30
4
[PATCH 1/3] nv50: remove vtxbuf stateobject after a referenced vtxbuf is mapped
...& PIPE_BUFFER_USAGE_VERTEX)) + return 0; + + /* Our vtxbuf got mapped, it can no longer be considered part of current + * state, remove it to avoid emitting reloc markers. + */ + if (ctx && ctx->state.vtxbuf && so_bo_is_reloc(ctx->state.vtxbuf, + nouveau_bo(pb))) { + so_ref(NULL, &ctx->state.vtxbuf); + ctx->dirty |= NV50_NEW_ARRAYS; + } + + return 0; +} + struct pipe_screen * nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev) { @@ -216,6 +238,7 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev) pscreen->get...
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