[Mesa-dev] [PATCH] gallivm: Disable gallivm to fix build with LLVM 3.6

Mathias Fröhlich Mathias.Froehlich at gmx.net
Wed Sep 24 12:08:33 PDT 2014


Hi,

On Wednesday, September 24, 2014 12:42:24 Jose Fonseca wrote:
> We're not the only one with similar needs.  Webkit has similar needs. 
> Though they opted by using LLVMCreateSimpleMCJITMemoryManager 
> https://trac.webkit.org/browser/trunk/Tools/ReducedFTL/ReducedFTL.c#L321 
>   and implemeting the memory manager themselves.
> 
> We could do the same.  We even have the code for it in 
> src/gallium/auxiliary/rtasm/rtasm_execmem.*    ( And if we add a mutex 
> we could make this thread safe too, without needing multiple jit 
> managers around)
> 
> 
> The other alternative would be to have another function besides 
> LLVMCreateSimpleMCJITMemoryManager that would create a standard 
> LLVMMCJITMemoryManagerRef.
> 
> 
> That said, the way we use these things are still a bit in flux. Mathias 
> has some pending patches.   BTW, Mathis, should I submit your patches 
> for making llvmpipe thread safe?  Also, what are your thoughts on this 
> issue?

Ok, I have updated the patches to keep that compiling with both versions
and still be thread safe with old enough llvm.
These updated ones are attached to this mail.
I don't mind if you want to push them now.
I expect that its introducing less potential conflicts on your
site if you can coordinate when these get applied?
And thanks for the heads up!!

With respect to that shader memory manager, I have just tried to
make this recently introduced piece of code work with multiple threads in action.
So, I do not need to keep this one. The time before that shader memory manager
was even easier for thread safety and the introduction of that one introduced
additional complications.
So every simple algorithm there is fine as long as the appropriate locks
are there to make them thread safe.
I only had a short look into your proposal, both variants look fine to me.

Thanks

Mathias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-llvmpipe-Reuse-llvmpipes-LLVMContext-in-the-draw-con.patch
Type: text/x-patch
Size: 5751 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140924/f33c481a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-llvmpipe-Make-a-llvmpipe-OpenGL-context-thread-safe.patch
Type: text/x-patch
Size: 7612 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140924/f33c481a/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-llvmpipe-Use-two-LLVMContexts-per-OpenGL-context-ins.patch
Type: text/x-patch
Size: 11522 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140924/f33c481a/attachment-0002.bin>


More information about the mesa-dev mailing list