Displaying 20 results from an estimated 24 matches for "vtxbuf".
2009 Oct 14
0
[PATCH 3/7] nv50: submit user vbo data through the fifo
...llium/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;
};
static INLINE struct nv50_context *
diff -...
2009 Dec 20
1
[PATCH] nv50: remove vtxbuf stateobject after a referenced vtxbuf is mapped
...;
}
+static int
+nv50_pre_pipebuffer_map(struct pipe_screen *pscreen, struct pipe_buffer *pb,
+ unsigned usage)
+{
+ struct nv50_screen *screen = nv50_screen(pscreen);
+ struct nv50_context *ctx = screen->cur_ctx;
+
+ if (!(pb->usage & 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...
2009 Dec 20
2
[PATCH 1/2] nv50: don't emit reloc markers after a referenced vtxbuf is mapped
...;
}
+static int
+nv50_pre_pipebuffer_map(struct pipe_screen *pscreen, struct pipe_buffer *pb,
+ unsigned usage)
+{
+ struct nv50_screen *screen = nv50_screen(pscreen);
+ struct nv50_context *ctx = screen->cur_ctx;
+
+ if (!(pb->usage & PIPE_BUFFER_USAGE_VERTEX))
+ return 0;
+
+ /* Our vtxbuf got mapped, it can no longer be considered part of current
+ * state, mark it as such, to avoid problematic relocs. */
+ if (ctx && ctx->state.vtxbuf && so_bo_is_reloc(ctx->state.vtxbuf,
+ nouveau_bo(pb)))
+ ctx->state.vtxbuf->emit_reloc_on_flush = false;
+
+ return 0...
2020 Oct 19
1
Small patch for nv50_vbo.c
...2 @@ nv50_user_vbuf_range(struct nv50_context *nv50, unsigned vbi,
assert(vbi < PIPE_MAX_ATTRIBS);
if (unlikely(nv50->vertex->instance_bufs & (1 << vbi))) {
/* TODO: use min and max instance divisor to get a proper range */
- *base = 0;
- *size = nv50->vtxbuf[vbi].buffer.resource->width0;
+ const uint32_t div = nv50->vertex->min_instance_div[vbi];
+ *base = nv50->instance_off * nv50->vtxbuf[vbi].stride;
+ *size = (nv50->instance_max / div) * nv50->vtxbuf[vbi].stride +
+ nv50->vertex->vb_access_size[vbi];...
2014 Apr 30
1
[PATCH 1/2] nouveau: remove cb_dirty, it's never used
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/gallium/drivers/nouveau/nouveau_buffer.c | 4 +---
src/gallium/drivers/nouveau/nouveau_context.h | 1 -
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.c b/src/gallium/drivers/nouveau/nouveau_buffer.c
index e308ff4..904e2cc 100644
---
2009 Jul 28
0
[PATCH 6/8] nv50: support more vtxelt formats
NOTE: we must not try to emit buffer relocations when
vtxbuf_nr is 0 but vtxelt_nr is not
---
src/gallium/drivers/nv50/nv50_vbo.c | 80 ++++++++++++++++++++++++----------
1 files changed, 56 insertions(+), 24 deletions(-)
diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
index cbd9d6a..422c8c6 100644
--- a/src/gallium...
2009 Dec 21
2
[PATCH 1/2] Unreference state/buffer objects on context/screen destruction
...ef(NULL, &nv50->state.vertprog);
+ if (nv50->state.fragprog)
+ so_ref(NULL, &nv50->state.fragprog);
+ if (nv50->state.programs)
+ so_ref(NULL, &nv50->state.programs);
+ if (nv50->state.vtxfmt)
+ so_ref(NULL, &nv50->state.vtxfmt);
+ if (nv50->state.vtxbuf)
+ so_ref(NULL, &nv50->state.vtxbuf);
+ if (nv50->state.vtxattr)
+ so_ref(NULL, &nv50->state.vtxattr);
+
draw_destroy(nv50->draw);
FREE(nv50);
}
Index: nv40/nv40_screen.c
===================================================================
--- nv40/nv40_screen.c (...
2009 Dec 30
4
[PATCH 1/3] nv50: remove vtxbuf stateobject after a referenced vtxbuf is mapped
...;
}
+static int
+nv50_pre_pipebuffer_map(struct pipe_screen *pscreen, struct pipe_buffer *pb,
+ unsigned usage)
+{
+ struct nv50_screen *screen = nv50_screen(pscreen);
+ struct nv50_context *ctx = screen->cur_ctx;
+
+ if (!(pb->usage & 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 |= NV...
2014 Nov 16
1
[PATCH 1/2] nv50, nvc0: actually check constbufs for invalidation
...allium/drivers/nouveau/nv50/nv50_context.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_context.c
@@ -214,8 +214,9 @@ nv50_invalidate_resource_storage(struct nouveau_context *ctx,
if (res->bind & PIPE_BIND_CONSTANT_BUFFER) {
for (s = 0; s < 3; ++s) {
- assert(nv50->num_vtxbufs <= NV50_MAX_PIPE_CONSTBUFS);
- for (i = 0; i < nv50->num_vtxbufs; ++i) {
+ for (i = 0; i < NV50_MAX_PIPE_CONSTBUFS; ++i) {
+ if (!(nv50->constbuf_valid[s] & (1 << i)))
+ continue;
if (!nv50->constbuf[s][i].user &&...
2009 Dec 17
1
Question about nv40_draw_array
.../mesa/src/mesa/main/dlist.c:7622
#5 0x98657b4b in neutral_CallList (i=1) at
/data/deadwood/AROS/AROS/contrib/gfx/libs/mesa/src/mesa/main/vtxfmt_tmp.h:298
#6 0x9853e65a in glCallList (list=1) at
/data/deadwood/AROS/AROS/contrib/gfx/libs/mesa/src/mesa/glapi/glapitemp.h:95
at this point nv40->vtxbuf[0] contains a vertex buffer that was
previously used to store a compiled call list.
My question is: how data from this buffer is being transfered to gfx
card/used by gfx card.
I went through the software path "nv40_draw_elements_swtnl" and found a
place in draw module where the buffe...
2010 Jan 18
1
[PATCH 1/2] nv30-nv40: Rewrite primitive splitting and emission
...nt, &restart);
- if (!vc) {
- FIRE_RING(chan);
- continue;
- }
-
- BEGIN_RING(chan, rankine, NV34TCL_VERTEX_BEGIN_END, 1);
- OUT_RING (chan, nvgl_primitive(mode));
-
- nr = (vc & 0xff);
+ while ((vc = nv30_primitive_chunk(&prim, &start)))
+ {
+ assert(start < (nv30->vtxbuf[0].buffer->size >> 2));
+ unsigned nr = (vc & 0xff);
if (nr) {
BEGIN_RING(chan, rankine, NV34TCL_VB_VERTEX_BATCH, 1);
OUT_RING (chan, ((nr - 1) << 24) | start);
start += nr;
}
- nr = vc >> 8;
- while (nr) {
- unsigned push = nr > 2047 ? 2047 : n...
2009 Dec 17
0
No subject
a fence in the command stream when you change the vtxbuf
addresses, on nv50 that is, I don't know about nv40, sorry.
But it *did* look like the blob inserts a fence after *uploading*
new data to a vertex buffer. That's why there's method 0x142c
in nv50_draw_arrays.
> Other observations:
> - the data during execution of gl commands actua...
2015 May 25
3
[PATCH 1/2] nv30/draw: rework some of the output vertex buffer logic
..._WRITE |
+ PIPE_TRANSFER_DISCARD_RANGE,
+ &r->transfer);
+ assert(map);
+ return map;
}
static void
@@ -127,12 +131,18 @@ nv30_render_draw_elements(struct vbuf_render *render,
for (i = 0; i < r->vertex_info.num_attribs; i++) {
PUSH_RESRC(push, NV30_3D(VTXBUF(i)), BUFCTX_VTXTMP,
nv04_resource(r->buffer), r->offset + r->vtxptr[i],
- NOUVEAU_BO_LOW | NOUVEAU_BO_RD, 0, 0);
+ NOUVEAU_BO_LOW | NOUVEAU_BO_RD, 0, NV30_3D_VTXBUF_DMA1);
}
if (!nv30_state_validate(nv30, ~0, FAL...
2012 Oct 28
4
[Bug 56474] New: 3D app segfaults on NV46
...video-nouveau 1.0.3
Attached dmesg.
supertuxkart segfaults on Debian. Attached backtrace.
21:16 < joi> try: "up; print res"
21:17 < gg0> (gdb) up
21:17 < gg0> #1 nv30_vbo_validate (nv30=0x94c2658) at nv30_vbo.c:239
21:17 < gg0> 239I PUSH_RESRC(push, NV30_3D(VTXBUF(i)), user ?
BUFCTX_VTXTMP : BUFCTX_VTXBUF,
21:17 < gg0> (gdb) print res
21:17 < gg0> $4 = (struct nv04_resource *) 0x0
21:35 < joi> gg0: try this one: http://bpaste.net/show/54017/
diff --git a/src/gallium/drivers/nv30/nv30_vbo.c
b/src/gallium/drivers/nv30/nv30_vbo...
2014 Jul 01
1
[PATCH 1/2] nv50: do an explicit flush on draw when there are persistent buffers
...rivers/nouveau/nv50/nv50_context.c
@@ -61,7 +61,7 @@ static void
nv50_memory_barrier(struct pipe_context *pipe, unsigned flags)
{
struct nv50_context *nv50 = nv50_context(pipe);
- int i;
+ int i, s;
if (flags & PIPE_BARRIER_MAPPED_BUFFER) {
for (i = 0; i < nv50->num_vtxbufs; ++i) {
@@ -74,6 +74,26 @@ nv50_memory_barrier(struct pipe_context *pipe, unsigned flags)
if (nv50->idxbuf.buffer &&
nv50->idxbuf.buffer->flags & PIPE_RESOURCE_FLAG_MAP_PERSISTENT)
nv50->base.vbo_dirty = TRUE;
+
+ for (s = 0; s < 3 &&...
2009 Dec 05
0
[PATCH] nouveau: avoid running out of relocs (attempt 3)
...p;& samplers; i++) {
+ if (!(samplers & (1 << i)))
+ continue;
+ so_get_push_reloc_markers(state->hw[NV30_STATE_FRAGTEX0+i],
+ &push, &reloc);
+ }
+
+ so_get_push_reloc_markers(state->hw[NV30_STATE_FRAGPROG],
+ &push, &reloc);
+ if (state->hw[NV30_STATE_VTXBUF] /*&& nv30->render_mode == HW*/)
+ so_get_push_reloc_markers(state->hw[NV30_STATE_VTXBUF],
+ &push, &reloc);
+
+ /* Will flush if necessary. */
+ MARK_RING (chan, push, reloc);
+
for (i = 0, states = state->dirty; states; i++) {
if (!(states & (1ULL << i))...
2009 Sep 12
0
[PATCH 10/13] nv50: proper linkage between VP and FP
...50/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 */
extern void nv50_vertprog_validate(struct nv50_context *nv50);
extern void nv50_fragprog_validate(struct nv50_context *nv50);
+extern void nv50_linkag...
2014 Jan 13
20
[PATCH 00/19] nv50: add sampler2DMS/GP support to get OpenGL 3.2
OK, so there's a bunch of stuff in here. The geometry stuff is based on the
work started by Bryan Cain and Christoph Bumiller.
Patches 01-12: Add support for geometry shaders and fix related issues
Patches 13-14: Make it possible for fb clears to operate on texture attachments
with an explicit layer set (as is allowed in gl 3.2).
Patches 15-17: Make ARB_texture_multisample work
2009 Nov 05
6
Some cosmetic NV10TCL method changes.
The attached patch does the cosmetic renouveau.xml changes I
proposed. I'm about to reply myself with some other patches to update
libdrm and then fix the API break up.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rename_some_nv10tcl_methods.patch
Type: text/x-diff
Size: 2507 bytes
Desc: not available
Url :
2016 Jun 05
0
[RFC PATCH] nouveau: add locking
...nvc0_memory_barrier(struct pipe_context *pipe, unsigned flags)
struct nouveau_pushbuf *push = nvc0->base.pushbuf;
int i, s;
+ pipe_mutex_lock(nvc0_context(pipe)->screen->base.push_mutex);
+
if (flags & PIPE_BARRIER_MAPPED_BUFFER) {
for (i = 0; i < nvc0->num_vtxbufs; ++i) {
if (!nvc0->vtxbuf[i].buffer)
@@ -108,6 +114,8 @@ nvc0_memory_barrier(struct pipe_context *pipe, unsigned flags)
nvc0->cb_dirty = true;
if (flags & (PIPE_BARRIER_VERTEX_BUFFER | PIPE_BARRIER_INDEX_BUFFER))
nvc0->base.vbo_dirty = true;
+
+ pipe_mute...