From 43e2109326d0b3bcf9b2241b054dadeceae33ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20Fr=C3=B6hlich?= Date: Sun, 21 Sep 2014 08:54:00 +0200 Subject: 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 Signed-off-by: Mathias Froehlich --- src/gallium/auxiliary/draw/draw_llvm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gallium/auxiliary/draw/draw_llvm.h') diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h index a4bd1ed..54a7da2 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.h +++ b/src/gallium/auxiliary/draw/draw_llvm.h @@ -462,6 +462,7 @@ struct draw_llvm { struct draw_context *draw; LLVMContextRef context; + boolean context_owned; struct draw_jit_context jit_context; struct draw_gs_jit_context gs_jit_context; @@ -490,7 +491,7 @@ llvm_geometry_shader(struct draw_geometry_shader *gs) struct draw_llvm * -draw_llvm_create(struct draw_context *draw); +draw_llvm_create(struct draw_context *draw, LLVMContextRef llvm_context); void draw_llvm_destroy(struct draw_llvm *llvm); -- cgit v1.1