summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_context.c
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2014-09-21 08:54:00 +0200
committerMathias Fröhlich <[email protected]>2014-09-30 20:51:02 +0200
commit43e2109326d0b3bcf9b2241b054dadeceae33ca5 (patch)
tree8114619f9112f06b984f9c5542b0e31309abfd76 /src/gallium/drivers/llvmpipe/lp_context.c
parentd90ff351f3a3598834f77b9c0723532b3abd3cd5 (diff)
llvmpipe: Reuse llvmpipes LLVMContext in the draw context.
Reuse the LLVMContext already allocated in llvmpipe_context for draw_llvm if ppossible. This should decrease the memory footprint of an llvmpipe context. v2: Fix compile with llvm disabled. Reviewed-by: Jose Fonseca <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_context.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_context.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c
index 3a9b4c22a9b..37b1ff4ed1b 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.c
+++ b/src/gallium/drivers/llvmpipe/lp_context.c
@@ -171,7 +171,8 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv )
/*
* Create drawing context and plug our rendering stage into it.
*/
- llvmpipe->draw = draw_create(&llvmpipe->pipe);
+ llvmpipe->draw = draw_create_with_llvm_context(&llvmpipe->pipe,
+ llvmpipe->context);
if (!llvmpipe->draw)
goto fail;