summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_context.c
diff options
context:
space:
mode:
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);