summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50/nv50_context.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-03-01 15:28:26 +1000
committerBen Skeggs <bskeggs@redhat.com>2011-03-01 17:23:31 +1000
commit1ba8e9510812f155359d380bda6876cdee5ba21e (patch)
treeed88f07edf5da16df482e1a3c35f5675f9ab7e2b /src/gallium/drivers/nv50/nv50_context.c
parent96d57722fda62e7710eb5281bcf014ddfb824ef9 (diff)
nouveau: ensure vbo_dirty is set when buffer write transfer complete
This introduces a shared nouveau_context struct to track such things. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_context.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_context.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index 03a5c3d2d9..912367b839 100644
--- a/src/gallium/drivers/nv50/nv50_context.c
+++ b/src/gallium/drivers/nv50/nv50_context.c
@@ -84,22 +84,28 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
struct pipe_winsys *pipe_winsys = pscreen->winsys;
struct nv50_screen *screen = nv50_screen(pscreen);
struct nv50_context *nv50;
+ struct pipe_context *pipe;
nv50 = CALLOC_STRUCT(nv50_context);
if (!nv50)
return NULL;
+ pipe = &nv50->base.pipe;
+
nv50->screen = screen;
+ nv50->base.screen = &screen->base;
+ nv50->base.copy_data = nv50_m2mf_copy_linear;
+ nv50->base.push_data = nv50_sifc_linear_u8;
- nv50->pipe.winsys = pipe_winsys;
- nv50->pipe.screen = pscreen;
- nv50->pipe.priv = priv;
+ pipe->winsys = pipe_winsys;
+ pipe->screen = pscreen;
+ pipe->priv = priv;
- nv50->pipe.destroy = nv50_destroy;
+ pipe->destroy = nv50_destroy;
- nv50->pipe.draw_vbo = nv50_draw_vbo;
- nv50->pipe.clear = nv50_clear;
+ pipe->draw_vbo = nv50_draw_vbo;
+ pipe->clear = nv50_clear;
- nv50->pipe.flush = nv50_flush;
+ pipe->flush = nv50_flush;
if (!screen->cur_ctx)
screen->cur_ctx = nv50;
@@ -109,13 +115,13 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
nv50_init_query_functions(nv50);
nv50_init_surface_functions(nv50);
nv50_init_state_functions(nv50);
- nv50_init_resource_functions(&nv50->pipe);
+ nv50_init_resource_functions(pipe);
- nv50->draw = draw_create(&nv50->pipe);
+ nv50->draw = draw_create(pipe);
assert(nv50->draw);
draw_set_rasterize_stage(nv50->draw, nv50_draw_render_stage(nv50));
- return &nv50->pipe;
+ return pipe;
}
struct resident {