search for: nv40_context

Displaying 13 results from an estimated 13 matches for "nv40_context".

Did you mean: nv30_context
2009 Dec 21
1
Clean up of nv40_context->state.hw and nv40_screen->state
Hi, I'm trying to find a place where objects held in nv40_context->state.hw[] and nv40_screen->state[] are being unreferenced during pipe_context destruction. Currently I'm observing that these objects are not unreferenced and since they hold reference to buffer objects, the buffer objects themselves are not unreferenced as well (for example color b...
2009 Dec 05
1
[PATCH] nouveau: avoid running out of relocs (attempt 4)
...j.h | 42 ++++++++++++++++++------ src/gallium/drivers/nv04/nv04_surface_2d.c | 9 +++-- src/gallium/drivers/nv30/nv30_context.c | 3 ++ src/gallium/drivers/nv30/nv30_context.h | 1 + src/gallium/drivers/nv30/nv30_state_emit.c | 10 +++++- src/gallium/drivers/nv40/nv40_context.c | 3 ++ src/gallium/drivers/nv40/nv40_context.h | 1 + src/gallium/drivers/nv40/nv40_state_emit.c | 10 +++++- src/gallium/drivers/nv50/nv50_query.c | 2 +- src/gallium/drivers/nv50/nv50_surface.c | 2 + src/gallium/drivers/nv50/nv50_transfer.c...
2010 Jan 18
1
[PATCH 1/2] nv30-nv40: Rewrite primitive splitting and emission
...- - count -= vc; - start = restart; } } diff --git a/src/gallium/drivers/nv40/nv40_vbo.c b/src/gallium/drivers/nv40/nv40_vbo.c index a777898..1182fc4 100644 --- a/src/gallium/drivers/nv40/nv40_vbo.c +++ b/src/gallium/drivers/nv40/nv40_vbo.c @@ -164,6 +164,121 @@ nv40_vbo_static_attrib(struct nv40_context *nv40, struct nouveau_stateobj *so, return TRUE; } +// TODO: share this with NV30 +struct nv40_primitive +{ + struct nv40_context *nv40; + unsigned mode; + unsigned start; + unsigned end; + unsigned vpp; + unsigned flags; + unsigned startv; + int chunk; +}; + +static inline void +nv40_primitiv...
2009 Dec 13
3
[PATCH] nouveau: avoid running out of relocs (attempt 5)
...j.h | 47 +++++++++++++++++++----- src/gallium/drivers/nv04/nv04_surface_2d.c | 9 +++-- src/gallium/drivers/nv30/nv30_context.c | 3 ++ src/gallium/drivers/nv30/nv30_context.h | 1 + src/gallium/drivers/nv30/nv30_state_emit.c | 10 +++++- src/gallium/drivers/nv40/nv40_context.c | 3 ++ src/gallium/drivers/nv40/nv40_context.h | 1 + src/gallium/drivers/nv40/nv40_state_emit.c | 10 +++++- src/gallium/drivers/nv50/nv50_query.c | 2 +- src/gallium/drivers/nv50/nv50_surface.c | 2 + src/gallium/drivers/nv50/nv50_transfer.c...
2009 Dec 21
2
[PATCH 1/2] Unreference state/buffer objects on context/screen destruction
...t;vp_data_heap); nouveau_resource_free(&screen->query_heap); Index: nv40/nv40_fragprog.c =================================================================== --- nv40/nv40_fragprog.c (wersja 32083) +++ nv40/nv40_fragprog.c (kopia robocza) @@ -948,6 +948,12 @@ nv40_fragprog_destroy(struct nv40_context *nv40, struct nv40_fragment_program *fp) { + if (fp->buffer) + pipe_buffer_reference(&fp->buffer, NULL); + + if (fp->so) + so_ref(NULL, &fp->so); + if (fp->insn_len) FREE(fp->insn); } Index: nv40/nv40_context.c =====================...
2009 Dec 30
4
[PATCH 1/3] nv50: remove vtxbuf stateobject after a referenced vtxbuf is mapped
- This avoids problematic "reloc'ed while mapped" messages and some associated corruption as well. Signed-off-by: Maarten Maathuis <madman2003 at gmail.com> --- src/gallium/drivers/nouveau/nouveau_screen.c | 21 +++++++++++++++++++++ src/gallium/drivers/nouveau/nouveau_screen.h | 3 +++ src/gallium/drivers/nouveau/nouveau_stateobj.h | 13 +++++++++++++
2010 Jan 18
0
[PATCH] nv30-nv40: support unlimited queries (v2)
...prog resources */ struct nouveau_resource *vp_exec_heap; diff --git a/src/gallium/drivers/nv40/nv40_query.c b/src/gallium/drivers/nv40/nv40_query.c index 8ed4a67..7cea56c 100644 --- a/src/gallium/drivers/nv40/nv40_query.c +++ b/src/gallium/drivers/nv40/nv40_query.c @@ -3,6 +3,7 @@ #include "nv40_context.h" struct nv40_query { + struct list_head list; struct nouveau_resource *object; unsigned type; boolean ready; @@ -23,6 +24,8 @@ nv40_query_create(struct pipe_context *pipe, unsigned query_type) q = CALLOC(1, sizeof(struct nv40_query)); q->type = query_type; + assert(q->ty...
2010 Jan 18
2
[PATCH 1/2] nv30-nv40: support unlimited queries
...prog resources */ struct nouveau_resource *vp_exec_heap; diff --git a/src/gallium/drivers/nv40/nv40_query.c b/src/gallium/drivers/nv40/nv40_query.c index 8ed4a67..01d35ea 100644 --- a/src/gallium/drivers/nv40/nv40_query.c +++ b/src/gallium/drivers/nv40/nv40_query.c @@ -3,6 +3,7 @@ #include "nv40_context.h" struct nv40_query { + struct list_head list; struct nouveau_resource *object; unsigned type; boolean ready; @@ -23,6 +24,8 @@ nv40_query_create(struct pipe_context *pipe, unsigned query_type) q = CALLOC(1, sizeof(struct nv40_query)); q->type = query_type; + as...
2010 Jan 18
0
[PATCH] nv04-nv40: Rewrite and unify miptree and transfer code (v2)
...ers/nv30/nv30_screen.c | 13 +-- src/gallium/drivers/nv30/nv30_state.h | 13 -- src/gallium/drivers/nv30/nv30_state_fb.c | 20 ++-- src/gallium/drivers/nv30/nv30_transfer.c | 178 --------------------- src/gallium/drivers/nv40/Makefile | 2 - src/gallium/drivers/nv40/nv40_context.h | 2 +- src/gallium/drivers/nv40/nv40_fragtex.c | 12 +- src/gallium/drivers/nv40/nv40_miptree.c | 235 --------------------------- src/gallium/drivers/nv40/nv40_screen.c | 13 +-- src/gallium/drivers/nv40/nv40_state.h | 13 -- src/gallium/drivers/nv40/nv40_state_fb.c...
2009 Dec 28
3
Synchronization mostly missing?
...the following function instead of pipe->flush in nv40_vbo.c: I think the remaining artifacts may be due to missing 2D engine synchronization, but I'm not sure how that works. Note that this causes the CPU to wait for rendering, which is not the correct solution static void nv40_sync(struct nv40_context *nv40) { nouveau_notifier_reset(nv40->screen->sync, 0); // BEGIN_RING(curie, 0x1d6c, 1); // OUT_RING(0x5c0); // static int value = 0x23; // BEGIN_RING(curie, 0x1d70, 1); // OUT_RING(value++); BEGIN_RING(curie, NV40TCL_NOTIFY, 1); OUT_RING(0); BEGIN_RING(curie, NV40TCL_NOP, 1); OUT_R...
2009 Dec 05
0
[PATCH] nouveau: avoid running out of relocs (attempt 3)
...L << i))) continue; diff --git a/src/gallium/drivers/nv40/nv40_state_emit.c b/src/gallium/drivers/nv40/nv40_state_emit.c index 1986929..45a0ea1 100644 --- a/src/gallium/drivers/nv40/nv40_state_emit.c +++ b/src/gallium/drivers/nv40/nv40_state_emit.c @@ -59,6 +59,7 @@ nv40_state_emit(struct nv40_context *nv40) struct nv40_screen *screen = nv40->screen; unsigned i, samplers; uint64_t states; + int push = 0, reloc = 0; if (nv40->pctx_id != screen->cur_pctx) { for (i = 0; i < NV40_STATE_MAX; i++) { @@ -69,6 +70,35 @@ nv40_state_emit(struct nv40_context *nv40) screen->cu...
2010 Jan 17
1
[PATCH 1/2] nv40: don't crash on empty fragment program
...ertions(+), 1 deletions(-) diff --git a/src/gallium/drivers/nv40/nv40_fragprog.c b/src/gallium/drivers/nv40/nv40_fragprog.c index 1237066..209d211 100644 --- a/src/gallium/drivers/nv40/nv40_fragprog.c +++ b/src/gallium/drivers/nv40/nv40_fragprog.c @@ -843,7 +843,8 @@ nv40_fragprog_translate(struct nv40_context *nv40, fp->fp_control |= fpc->num_regs << NV40TCL_FP_CONTROL_TEMP_COUNT_SHIFT; /* Terminate final instruction */ - fp->insn[fpc->inst_offset] |= 0x00000001; + if(fp->insn) + fp->insn[fpc->inst_offset] |= 0x00000001; /* Append NOP + END instruction...
2010 Jan 18
0
[PATCH] nv04-nv40: Rewrite and unify miptree and transfer code
....c diff --git a/src/gallium/drivers/nv40/nv40_fragtex.c b/src/gallium/drivers/nv40/nv40_fragtex.c index aad9198..e3eac23 100644 --- a/src/gallium/drivers/nv40/nv40_fragtex.c +++ b/src/gallium/drivers/nv40/nv40_fragtex.c @@ -62,9 +62,9 @@ static struct nouveau_stateobj * nv40_fragtex_build(struct nv40_context *nv40, int unit) { struct nv40_sampler_state *ps = nv40->tex_sampler[unit]; - struct nv40_miptree *nv40mt = nv40->tex_miptree[unit]; - struct nouveau_bo *bo = nouveau_bo(nv40mt->buffer); - struct pipe_texture *pt = &nv40mt->base; + struct nv04_miptree *mt = nv40->tex_miptree[u...