Skip to content

llvmpipe: Use a second LLVMContext for compiling sample functions

llvmpipe: Use a second LLVMContext for compiling sample functions

LLVMContextr is not thread safe. There are many code paths that use
llvmpipe_context::context and adding locking to all of them is
difficult and adds unnecessary overhead. This approach restricts locking
to lp_sampler_matrix, which makes covering all uses of the LLVMContext
easy and only adds overhead when running lavapipe.

Fixes: 7ebf7f4 ("llvmpipe: Compile sample functioins on demand")

Merge request reports