summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_context.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-09-13 00:34:56 +0200
committerMarek Olšák <[email protected]>2012-09-30 18:57:56 +0200
commitff2d192ec50e6a8cbaa8f14bca989fe5b61a3c46 (patch)
treea5f32b49c872d2ce0deb7e67348d7de83cacbdbe /src/gallium/drivers/llvmpipe/lp_context.c
parent6d2f59ce5494a9435b6b3d3faa1d94ba6caad100 (diff)
llvmpipe: implement blit
Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_context.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_context.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c
index dec34738029..e59ae237efd 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.c
+++ b/src/gallium/drivers/llvmpipe/lp_context.c
@@ -58,6 +58,10 @@ static void llvmpipe_destroy( struct pipe_context *pipe )
lp_print_counters();
+ if (llvmpipe->blitter) {
+ util_blitter_destroy(llvmpipe->blitter);
+ }
+
/* This will also destroy llvmpipe->setup:
*/
if (llvmpipe->draw)
@@ -168,6 +172,14 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv )
if (!llvmpipe->setup)
goto fail;
+ llvmpipe->blitter = util_blitter_create(&llvmpipe->pipe);
+ if (!llvmpipe->blitter) {
+ goto fail;
+ }
+
+ /* must be done before installing Draw stages */
+ util_blitter_cache_all_shaders(llvmpipe->blitter);
+
/* plug in AA line/point stages */
draw_install_aaline_stage(llvmpipe->draw, &llvmpipe->pipe);
draw_install_aapoint_stage(llvmpipe->draw, &llvmpipe->pipe);