aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_test_printf.c
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2014-08-28 19:49:35 +0200
committerMathias Fröhlich <[email protected]>2014-09-30 20:45:19 +0200
commit83c62597fc8eb38bf274fa1a3ca03c6adafb4bf9 (patch)
tree512da771be3fa564311d151785c62eb06ad40a64 /src/gallium/drivers/llvmpipe/lp_test_printf.c
parent98d00d664009c74ac0c827b3c41c15e3fe1993d4 (diff)
llvmpipe: Use two LLVMContexts per OpenGL context instead of a global one.
This is one step to make llvmpipe thread safe as mandated by the OpenGL standard. Using the global LLVMContext is obviously a problem for that kind of use pattern. The patch introduces two LLVMContext instances that are private to an OpenGL context and used for all compiles. One is put into struct draw_llvm and the other one into struct llvmpipe_context. Reviewed-by: Jose Fonseca <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_test_printf.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_printf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test_printf.c b/src/gallium/drivers/llvmpipe/lp_test_printf.c
index 4b74ae96a7a..fe4ce0fc5d7 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_printf.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_printf.c
@@ -94,7 +94,7 @@ test_printf(unsigned verbose, FILE *fp,
test_printf_t test_printf_func;
boolean success = TRUE;
- gallivm = gallivm_create("test_module");
+ gallivm = gallivm_create("test_module", LLVMGetGlobalContext());
test = add_printf_test(gallivm);