diff options
author | Brian <[email protected]> | 2007-08-02 12:12:48 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-08-02 12:12:48 -0600 |
commit | 55314f8f311bff065f609ff17c8421a8d5216b84 (patch) | |
tree | 11bd3fddbf45c47edc65db370827f9281c93b62d /src/mesa/pipe/softpipe | |
parent | 0e067f1fb20094417e84e1b18f2302251cece2ca (diff) |
Implement new draw_vertices() path for simple vertex array drawing, use it for glClear.
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_context.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c index 434e18308ab..9fba9605e8c 100644 --- a/src/mesa/pipe/softpipe/sp_context.c +++ b/src/mesa/pipe/softpipe/sp_context.c @@ -102,6 +102,25 @@ static void softpipe_draw_vb( struct pipe_context *pipe, } +static void +softpipe_draw_vertices(struct pipe_context *pipe, + GLuint mode, + GLuint numVertex, const GLfloat *verts, + GLuint numAttribs, const GLuint attribs[]) +{ + struct softpipe_context *softpipe = softpipe_context( pipe ); + + if (softpipe->dirty) + softpipe_update_derived( softpipe ); + + /* XXX move mapping/unmapping to higher/coarser level? */ + map_surfaces(softpipe); + draw_vertices(softpipe->draw, mode, numVertex, verts, numAttribs, attribs); + unmap_surfaces(softpipe); +} + + + static void softpipe_reset_occlusion_counter(struct pipe_context *pipe) { struct softpipe_context *softpipe = softpipe_context( pipe ); @@ -137,6 +156,7 @@ struct pipe_context *softpipe_create( void ) softpipe->pipe.set_texture_state = softpipe_set_texture_state; softpipe->pipe.set_viewport_state = softpipe_set_viewport_state; softpipe->pipe.draw_vb = softpipe_draw_vb; + softpipe->pipe.draw_vertices = softpipe_draw_vertices; softpipe->pipe.clear = softpipe_clear; softpipe->pipe.reset_occlusion_counter = softpipe_reset_occlusion_counter; softpipe->pipe.get_occlusion_counter = softpipe_get_occlusion_counter; |