summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe/sp_context.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-15 19:03:20 -0600
committerBrian <[email protected]>2007-08-15 19:04:45 -0600
commitd9a230f30a98eb677bba869a6f7bb9a840e36354 (patch)
treea87287fc96f6e41173448dc9b7cd9f9222398e48 /src/mesa/pipe/softpipe/sp_context.c
parent2de99586246d758da14e281718d85c499d1969d6 (diff)
Hook in new draw_arrays() code, disabled for now.
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_context.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index 1ea6bbbf7fe..4c0dacd4588 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -108,7 +108,8 @@ softpipe_max_texture_size(struct pipe_context *pipe, unsigned textureType,
}
-static void map_surfaces(struct softpipe_context *sp)
+void
+softpipe_map_surfaces(struct softpipe_context *sp)
{
struct pipe_context *pipe = &sp->pipe;
unsigned i;
@@ -143,7 +144,8 @@ static void map_surfaces(struct softpipe_context *sp)
}
-static void unmap_surfaces(struct softpipe_context *sp)
+void
+softpipe_unmap_surfaces(struct softpipe_context *sp)
{
struct pipe_context *pipe = &sp->pipe;
unsigned i;
@@ -197,9 +199,9 @@ static void softpipe_draw_vb( struct pipe_context *pipe,
softpipe_update_derived( softpipe );
/* XXX move mapping/unmapping to higher/coarser level? */
- map_surfaces(softpipe);
+ softpipe_map_surfaces(softpipe);
draw_vb( softpipe->draw, VB );
- unmap_surfaces(softpipe);
+ softpipe_unmap_surfaces(softpipe);
}
@@ -215,9 +217,9 @@ softpipe_draw_vertices(struct pipe_context *pipe,
softpipe_update_derived( softpipe );
/* XXX move mapping/unmapping to higher/coarser level? */
- map_surfaces(softpipe);
+ softpipe_map_surfaces(softpipe);
draw_vertices(softpipe->draw, mode, numVertex, verts, numAttribs, attribs);
- unmap_surfaces(softpipe);
+ softpipe_unmap_surfaces(softpipe);
}
@@ -274,8 +276,13 @@ struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys,
softpipe->pipe.set_stencil_state = softpipe_set_stencil_state;
softpipe->pipe.set_texture_state = softpipe_set_texture_state;
softpipe->pipe.set_viewport_state = softpipe_set_viewport_state;
+ softpipe->pipe.set_vertex_buffer = softpipe_set_vertex_buffer;
+ softpipe->pipe.set_vertex_element = softpipe_set_vertex_element;
+
softpipe->pipe.draw_vb = softpipe_draw_vb;
softpipe->pipe.draw_vertices = softpipe_draw_vertices;
+ softpipe->pipe.draw_arrays = softpipe_draw_arrays;
+
softpipe->pipe.clear = softpipe_clear;
softpipe->pipe.flush = softpipe_flush;
softpipe->pipe.reset_occlusion_counter = softpipe_reset_occlusion_counter;
@@ -309,6 +316,10 @@ struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys,
assert(softpipe->draw);
draw_set_setup_stage(softpipe->draw, sp_draw_render_stage(softpipe));
+ draw_set_vertex_array_info(softpipe->draw,
+ softpipe->vertex_buffer,
+ softpipe->vertex_element);
+
sp_init_region_functions(softpipe);
sp_init_surface_functions(softpipe);