search for: nouveau_stateobj

Displaying 20 results from an estimated 21 matches for "nouveau_stateobj".

2009 Dec 04
3
[PATCH] nouveau: avoid running out of relocs
Signed-off-by: Maarten Maathuis <madman2003 at gmail.com> --- src/gallium/drivers/nouveau/nouveau_stateobj.h | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/nouveau/nouveau_stateobj.h b/src/gallium/drivers/nouveau/nouveau_stateobj.h index b595405..28f483f 100644 --- a/src/gallium/drivers/nouveau/nouveau_stateobj.h +++ b/src/gallium/drivers/nouveau/...
2009 Dec 18
1
[PATCH] nouveau: don't emit reloc markers for bo's that are mapped
Signed-off-by: Maarten Maathuis <madman2003 at gmail.com> --- src/gallium/drivers/nouveau/nouveau_stateobj.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/nouveau/nouveau_stateobj.h b/src/gallium/drivers/nouveau/nouveau_stateobj.h index 9aee9e4..6c40f64 100644 --- a/src/gallium/drivers/nouveau/nouveau_stateobj.h +++ b/src/gallium/drivers/nouveau/nou...
2009 Dec 20
2
[PATCH 1/2] nv50: don't emit reloc markers after a referenced vtxbuf is mapped
...ile 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 | 20 +++++++++++++++++++- src/gallium/drivers/nv50/nv50_screen.c | 20 ++++++++++++++++++++ src/gallium/drivers/nv50/nv50_screen.h | 2 ++ src/gallium/drivers/nv50/nv50_state_validate.c | 2 ++ src/gallium/drivers/nv50/nv50_vbo.c | 4 +++- 7 files changed,...
2009 Dec 05
0
[PATCH] nouveau: avoid running out of relocs (attempt 3)
- NV30 and NV40 need testing. - I'll take better naming suggestions for so_get_push_reloc(). --- src/gallium/drivers/nouveau/nouveau_stateobj.h | 49 +++++++++++++++++++----- src/gallium/drivers/nv04/nv04_surface_2d.c | 9 +++- src/gallium/drivers/nv30/nv30_state_emit.c | 26 ++++++++++++ src/gallium/drivers/nv40/nv40_state_emit.c | 30 ++++++++++++++ src/gallium/drivers/nv50/nv50_query.c | 2 +- src/gall...
2009 Dec 20
1
[PATCH] nv50: remove vtxbuf stateobject after a referenced vtxbuf is mapped
...d one nouveau_bo_unmap() in the vbo code that wasn't present. 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 +++++++++++++ src/gallium/drivers/nv50/nv50_screen.c | 23 +++++++++++++++++++++++ src/gallium/drivers/nv50/nv50_screen.h | 2 ++ src/gallium/drivers/nv50/nv50_state_validate.c | 2 ++ src/gallium/drivers/nv50/nv50_vbo.c | 4 +++- 7 files changed, 67...
2009 Dec 05
1
[PATCH] nouveau: avoid running out of relocs (attempt 4)
- Added flush notify functions for NV30 and NV40. - NV30 and NV40 need testing. --- src/gallium/drivers/nouveau/nouveau_stateobj.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/n...
2009 Dec 30
4
[PATCH 1/3] nv50: remove vtxbuf stateobject after a referenced vtxbuf is mapped
...ile 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 +++++++++++++ src/gallium/drivers/nv50/nv50_screen.c | 23 +++++++++++++++++++++++ src/gallium/drivers/nv50/nv50_screen.h | 2 ++ src/gallium/drivers/nv50/nv50_state_validate.c | 3 +++ 6 files changed, 65 insertions(+), 0 deletions(-) diff --git a/src/gallium/dri...
2009 Dec 13
3
[PATCH] nouveau: avoid running out of relocs (attempt 5)
- Added flush notify functions for NV30 and NV40. - NV30 and NV40 need testing (check for regressions). --- src/gallium/drivers/nouveau/nouveau_stateobj.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/n...
2009 Oct 10
0
[PATCH 1/7] nv50: use SIFC for TIC, TSC upload
...+198,11 @@ extern void nv50_program_destroy(struct nv50_context *nv50, struct nv50_program extern boolean nv50_state_validate(struct nv50_context *nv50); extern void nv50_state_flush_notify(struct nouveau_channel *chan); +extern void nv50_so_init_sifc(struct nv50_context *nv50, + struct nouveau_stateobj *so, + struct nouveau_bo *bo, unsigned reloc, + unsigned size); + /* nv50_tex.c */ extern void nv50_tex_validate(struct nv50_context *); diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c index dd7baec..66361dc 100644 --- a/src/gallium/d...
2009 Sep 12
0
[PATCH 10/13] nv50: proper linkage between VP and FP
...etions(-) diff --git a/src/gallium/drivers/nv50/nv50_context.h b/src/gallium/drivers/nv50/nv50_context.h index 1e9e8e4..3a5f990 100644 --- a/src/gallium/drivers/nv50/nv50_context.h +++ b/src/gallium/drivers/nv50/nv50_context.h @@ -116,6 +116,7 @@ struct nv50_state { unsigned miptree_nr; struct nouveau_stateobj *vertprog; struct nouveau_stateobj *fragprog; + struct nouveau_stateobj *programs; struct nouveau_stateobj *vtxfmt; struct nouveau_stateobj *vtxbuf; struct nouveau_stateobj *vtxattr; @@ -190,6 +191,7 @@ extern void nv50_clear(struct pipe_context *pipe, unsigned buffers, /* nv50_program.c *...
2010 Jan 18
1
[PATCH 1/2] nv30-nv40: Rewrite primitive splitting and emission
...return max; } diff --git a/src/gallium/drivers/nv30/nv30_vbo.c b/src/gallium/drivers/nv30/nv30_vbo.c index 1c5db03..b89ef5d 100644 --- a/src/gallium/drivers/nv30/nv30_vbo.c +++ b/src/gallium/drivers/nv30/nv30_vbo.c @@ -163,6 +163,121 @@ nv30_vbo_static_attrib(struct nv30_context *nv30, struct nouveau_stateobj *so, return TRUE; } +// TODO: share this with NV40 instead of duplicating +struct nv30_primitive +{ + struct nv30_context *nv30; + unsigned mode; + unsigned start; + unsigned end; + unsigned vpp; + unsigned flags; + unsigned startv; + int chunk; +}; + +static inline void +nv30_primitive_init(s...
2009 Oct 14
0
[PATCH 3/7] nv50: submit user vbo data through the fifo
...4 insertions(+), 18 deletions(-) diff --git a/src/gallium/drivers/nv50/nv50_context.h b/src/gallium/drivers/nv50/nv50_context.h index be53990..8e2d695 100644 --- a/src/gallium/drivers/nv50/nv50_context.h +++ b/src/gallium/drivers/nv50/nv50_context.h @@ -120,6 +120,7 @@ struct nv50_state { struct nouveau_stateobj *vtxfmt; struct nouveau_stateobj *vtxbuf; struct nouveau_stateobj *vtxattr; + unsigned vtxelt_nr; }; struct nv50_context { @@ -152,6 +153,8 @@ struct nv50_context { unsigned sampler_nr; struct nv50_miptree *miptree[PIPE_MAX_SAMPLERS]; unsigned miptree_nr; + + uint16_t vbo_fifo; };...
2009 Jun 21
0
[PATCH] nv50: add support for two-sided lighting
..._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_program_validate(nv50, p); @@ -2421,18 +2435,7 @@ nv50_fragprog_validate(struct nv50_context *nv50) nv50_program_validate_data(nv50, p); nv50_program_validate_code(nv50, p); - so = so_new(32, 0); - so_method(so, tesla, 0x1904, 4); - so_d...
2009 May 08
0
[PATCH] gallium/nv50: fix multi-texturing
...50/nv50_tex.c b/src/gallium/drivers/nv50/nv50_tex.c index 223c8a3..e7e1521 100644 --- a/src/gallium/drivers/nv50/nv50_tex.c +++ b/src/gallium/drivers/nv50/nv50_tex.c @@ -136,8 +136,12 @@ nv50_tex_validate(struct nv50_context *nv50) struct nouveau_grobj *tesla = nv50->screen->tesla; struct nouveau_stateobj *so; int unit; + unsigned push_nr; - so = so_new(nv50->miptree_nr * 8 + 3, nv50->miptree_nr * 2); + push_nr = MAX2(nv50->miptree_nr, nv50->texbind_nr) * 2; + push_nr += nv50->miptree_nr * 8 + 3; + + so = so_new(push_nr, nv50->miptree_nr * 2); so_method(so, tesla, 0x0f00, 1);...
2009 Jul 28
0
[PATCH 6/8] nv50: support more vtxelt formats
...0); + } + + NOUVEAU_ERR("invalid vbo format %s\n",pf_name(pf)); + assert(0); + return (nf | 0x08000000); +} + boolean nv50_draw_arrays(struct pipe_context *pipe, unsigned mode, unsigned start, unsigned count) @@ -208,6 +259,10 @@ nv50_vbo_validate(struct nv50_context *nv50) struct nouveau_stateobj *vtxbuf, *vtxfmt; int i; + /* don't validate if Gallium took away our buffers */ + if (nv50->vtxbuf_nr == 0) + return; + vtxbuf = so_new(nv50->vtxelt_nr * 4, nv50->vtxelt_nr * 2); vtxfmt = so_new(nv50->vtxelt_nr + 1, 0); so_method(vtxfmt, tesla, 0x1ac0, nv50->vtxelt_nr...
2009 Sep 12
0
[PATCH 13/13] nv50: add support for point sprites
...)) + 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]; + uint32_t map[16], lin[4], reg[5], pcrd[8]; memset(map, 0, sizeof(map)); memset(lin, 0, sizeof(lin)); @@ -2798,6 +2843,13 @@ nv50_linkage_validate(struct nv50_context *nv50) so_method(so, tesla,...
2010 Jan 18
0
[PATCH] nv04-nv40: Rewrite and unify miptree and transfer code
...30_transfer.c \ nv30_vbo.c \ nv30_vertprog.c diff --git a/src/gallium/drivers/nv30/nv30_fragtex.c b/src/gallium/drivers/nv30/nv30_fragtex.c index 0cc3172..36d2666 100644 --- a/src/gallium/drivers/nv30/nv30_fragtex.c +++ b/src/gallium/drivers/nv30/nv30_fragtex.c @@ -59,9 +59,9 @@ static struct nouveau_stateobj * nv30_fragtex_build(struct nv30_context *nv30, int unit) { struct nv30_sampler_state *ps = nv30->tex_sampler[unit]; - struct nv30_miptree *nv30mt = nv30->tex_miptree[unit]; - struct pipe_texture *pt = &nv30mt->base; - struct nouveau_bo *bo = nouveau_bo(nv30mt->buffer); + struct...
2010 Jan 18
0
[PATCH] nv04-nv40: Rewrite and unify miptree and transfer code (v2)
...unsigned nr_textures; unsigned dirty_samplers; diff --git a/src/gallium/drivers/nv30/nv30_fragtex.c b/src/gallium/drivers/nv30/nv30_fragtex.c index 0cc3172..36d2666 100644 --- a/src/gallium/drivers/nv30/nv30_fragtex.c +++ b/src/gallium/drivers/nv30/nv30_fragtex.c @@ -59,9 +59,9 @@ static struct nouveau_stateobj * nv30_fragtex_build(struct nv30_context *nv30, int unit) { struct nv30_sampler_state *ps = nv30->tex_sampler[unit]; - struct nv30_miptree *nv30mt = nv30->tex_miptree[unit]; - struct pipe_texture *pt = &nv30mt->base; - struct nouveau_bo *bo = nouveau_bo(nv30mt->buffer); + struct...
2010 Mar 10
2
[Bug 26992] New: Systemsettings crashes when I try to open desktop settings
...t>) at /usr/include/nouveau/nouveau_pushbuf.h:70 #6 BEGIN_RING (ws=<value optimized out>, dev=<value optimized out>) at /usr/include/nouveau/nouveau_pushbuf.h:110 #7 so_emit (ws=<value optimized out>, dev=<value optimized out>) at ../../../../src/gallium/drivers/nouveau/nouveau_stateobj.h:256 #8 nv50_screen_create (ws=<value optimized out>, dev=<value optimized out>) at nv50_screen.c:312 #9 0x00007fc5c71e2ef6 in nouveau_drm_create_screen (api=0x7fc5c7634f20, fd=<value optimized out>, arg=0x7fff40065e80) at nouveau_drm_api.c:108 #10 0x00007fc5c71e1188 in dri_ini...
2010 Jan 18
2
[PATCH 1/2] nv30-nv40: support unlimited queries
Currently on NV30/NV40 an assert will be triggered once 32 queries are outstanding. This violates the OpenGL/Gallium interface, which requires support for an unlimited number of fences. This patch fixes the problem by putting queries in a linked list and waiting on the oldest one if allocation fails. nVidia seems to use a similar strategy, but with 1024 instead of 32 fences. The next patch will