diff options
author | Marek Olšák <[email protected]> | 2012-09-13 00:48:58 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-09-30 18:57:57 +0200 |
commit | 3d9d4b1ce6e700d85920eca84ae58a4dcf7288c2 (patch) | |
tree | a30ee74d8c81b29ea6fc4697df61c72c6cc366f3 /src/gallium/drivers/softpipe/sp_context.c | |
parent | 5f3054dcc46c35f76449cf8520cbbd02d36a6f01 (diff) |
softpipe: implement blit
Tested-by: Michel Dänzer <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_context.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_context.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index 0360b3ba9fb..891bb261d8a 100644 --- a/src/gallium/drivers/softpipe/sp_context.c +++ b/src/gallium/drivers/softpipe/sp_context.c @@ -99,6 +99,10 @@ softpipe_destroy( struct pipe_context *pipe ) pipe_sampler_view_reference(&softpipe->pstipple.sampler_view, NULL); #endif + if (softpipe->blitter) { + util_blitter_destroy(softpipe->blitter); + } + if (softpipe->draw) draw_destroy( softpipe->draw ); @@ -310,6 +314,13 @@ softpipe_create_context( struct pipe_screen *screen, draw_set_rasterize_stage(softpipe->draw, softpipe->vbuf); draw_set_render(softpipe->draw, softpipe->vbuf_backend); + softpipe->blitter = util_blitter_create(&softpipe->pipe); + if (!softpipe->blitter) { + goto fail; + } + + /* must be done before installing Draw stages */ + util_blitter_cache_all_shaders(softpipe->blitter); /* plug in AA line/point stages */ draw_install_aaline_stage(softpipe->draw, &softpipe->pipe); |