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

Mathias Fröhlich Mathias.Froehlich at gmx.net
Sun Jul 13 09:13:39 PDT 2014

Hi Jose,

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 deviates form your last suggestion. But lacking sufficient time
I just went ahead and implemented something that fixes this problem
preserving hopefully enough of the memory savings the shared
ShaderMemoryManager initially provided. The more extended solution
with a single jit memory manager per GL context could be implemented
on top of this change.

Please review!

Mathias Fröhlich (2):
  llvmpipe: Pool the LLVMContexts in use.
  llvmpipe: Make a llvmpipe OpenGL context thread safe.

 src/gallium/auxiliary/gallivm/lp_bld_init.c   | 87 ++++++++++++++++++++++++---
 src/gallium/auxiliary/gallivm/lp_bld_init.h   |  1 +
 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 38 ++++++------
 src/gallium/auxiliary/gallivm/lp_bld_misc.h   |  3 +
 4 files changed, 100 insertions(+), 29 deletions(-)


More information about the mesa-dev mailing list