[Mesa-dev] [PATCH 0/2] Make a llvmpipe context basically thread safe v2.

Jose Fonseca jfonseca at vmware.com
Wed Sep 17 08:07:28 PDT 2014


On 14/09/14 15:29, Mathias Fröhlich wrote:
>
> Hi, Jose,
>
> On Sunday, August 31, 2014 10:06:22 Mathias.Froehlich at gmx.net wrote:
>> This makes llvmpipe thread safe as mandated by the OpenGL standard.
>> The changes replace the use of two global data structures with
>> non global ones.
>> The changes pass piglit as of today without regressions.
>> The patchset now sticks to your initial suggestion and the review notes to
>> the first patch version.
>
> Did you have a chance to look into these?
>
> Greetings and thanks
>
> Mathias
>

Hi Mathias,


I'm sorry for the delay.  I had these flagged in my inbox, but I can't 
seem to shrink the size of my inbox it nowadays.   Anyway, I think I've 
abused your patience already, so I finally made the time to look into this.


The series looks great overall.  I think you can commit it as it.


That said, I'm concerned that having two JIT managers per llvmpipe 
context will increase memory footprint, so I'd really appreciate if you 
could make a follow-up change that merges them somehow.  Either:

- create another draw_create() alternative, eg., 
draw_create_with_llvm_context() that takes a LLVM context.

or

- modify llvmpipe_create_context() to borrow draw's LLVM context somehow 
(maybe add a new entry point, draw_context_get_llvm_context() to get it )

I don't have much preference either way.  Of course, whatever way you 
choose, care must be taken at context destruction to ensure no dangling 
pointers to the llvm context is ever derreferenced.


Thanks,

Jose


More information about the mesa-dev mailing list