summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_vbo.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-06-23 13:13:22 +0200
committerChristoph Bumiller <[email protected]>2011-06-24 00:15:58 +0200
commit9c5d15e929f47f517f90977f5420e11dfbd3db67 (patch)
treefb2780dcef417e25576a41f4750cfa7161b531c7 /src/gallium/drivers/nv50/nv50_vbo.c
parent1f544cc58794cffe5d5cac5a83efde91154f1b7d (diff)
nv50,nvc0: prevent pushbuf flush during ctx reloc emission
Should unify this too, but will delay that until the planned libdrm_nouveau/winsys changes which are likely to cause major changes to this bo validation code too.
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_vbo.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_vbo.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
index abdb9ce2f93..bb08941c243 100644
--- a/src/gallium/drivers/nv50/nv50_vbo.c
+++ b/src/gallium/drivers/nv50/nv50_vbo.c
@@ -404,9 +404,6 @@ nv50_draw_arrays(struct nv50_context *nv50,
struct nouveau_channel *chan = nv50->screen->base.channel;
unsigned prim;
- chan->flush_notify = nv50_draw_vbo_flush_notify;
- chan->user_private = nv50;
-
prim = nv50_prim_gl(mode);
while (instance_count--) {
@@ -420,8 +417,6 @@ nv50_draw_arrays(struct nv50_context *nv50,
prim |= NV50_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT;
}
-
- chan->flush_notify = nv50_default_flush_notify;
}
static void
@@ -523,9 +518,6 @@ nv50_draw_elements(struct nv50_context *nv50, boolean shorten,
unsigned prim;
const unsigned index_size = nv50->idxbuf.index_size;
- chan->flush_notify = nv50_draw_vbo_flush_notify;
- chan->user_private = nv50;
-
prim = nv50_prim_gl(mode);
if (index_bias != nv50->state.index_bias) {
@@ -631,8 +623,6 @@ nv50_draw_elements(struct nv50_context *nv50, boolean shorten,
prim |= NV50_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT;
}
}
-
- chan->flush_notify = nv50_default_flush_notify;
}
void
@@ -659,8 +649,12 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
nv50_state_validate(nv50);
+ chan->flush_notify = nv50_draw_vbo_flush_notify;
+ chan->user_private = nv50;
+
if (nv50->vbo_fifo) {
nv50_push_vbo(nv50, info);
+ chan->flush_notify = nv50_default_flush_notify;
return;
}
@@ -712,6 +706,7 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
info->mode, info->start, info->count,
info->instance_count, info->index_bias);
}
+ chan->flush_notify = nv50_default_flush_notify;
nv50_release_user_vbufs(nv50);
}