[Mesa-dev] [PATCH 05/12] gallivm: Use LLVM global context.

Mathias Fröhlich Mathias.Froehlich at gmx.net
Mon May 26 12:26:07 PDT 2014


Hi,

On Thursday, May 22, 2014 03:38:12 Jose Fonseca wrote:
> In short, besides the existing gallivm_context (which is actually not per context, but rather per module/ compilation unit) there should be a new object, that's truly per context, that holds two things:
> 
>  - LLVMContextRef
>  - src/gallium/auxiliary/gallivm/lp_bld_misc.cpp's ShaderMemoryManager.

I have played around with the mentioned pool of LLVMContexts around.
The patch doing that is attached.

Sadly the introduction of the ShaderMemoryManager breaks again
multithreading in a fatal way.

So, the attached patch seems to fix the races and should in theory help
for your observed leakage.
But only if applied to a state before the introduction of
ShaderMemoryManager...

Greetings

Mathias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Pool-the-LLVMContexts-in-use.patch
Type: text/x-patch
Size: 4271 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140526/f5916d71/attachment.bin>


More information about the mesa-dev mailing list