summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_llvm.h
diff options
context:
space:
mode:
authorMathias Fröhlich <Mathias.Froehlich@gmx.net>2014-08-28 19:49:35 +0200
committerMathias Fröhlich <Mathias.Froehlich@gmx.net>2014-09-30 20:45:19 +0200
commit83c62597fc8eb38bf274fa1a3ca03c6adafb4bf9 (patch)
tree512da771be3fa564311d151785c62eb06ad40a64 /src/gallium/auxiliary/draw/draw_llvm.h
parent98d00d664009c74ac0c827b3c41c15e3fe1993d4 (diff)
downloadexternal_mesa3d-83c62597fc8eb38bf274fa1a3ca03c6adafb4bf9.zip
external_mesa3d-83c62597fc8eb38bf274fa1a3ca03c6adafb4bf9.tar.gz
external_mesa3d-83c62597fc8eb38bf274fa1a3ca03c6adafb4bf9.tar.bz2
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 <jfonseca@vmware.com> Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_llvm.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h
index ed97cf7..a4bd1ed 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.h
+++ b/src/gallium/auxiliary/draw/draw_llvm.h
@@ -461,6 +461,8 @@ struct llvm_geometry_shader {
struct draw_llvm {
struct draw_context *draw;
+ LLVMContextRef context;
+
struct draw_jit_context jit_context;
struct draw_gs_jit_context gs_jit_context;