[Mesa-users] osmesa swrast windows/linux

Brian Paul brianp at vmware.com
Tue Mar 1 16:53:32 UTC 2016

On 02/29/2016 09:31 AM, Andreas Fänger wrote:
> Hi,
> We are using Mesa3D for server based rendering of single images on
> windows and linux. As this is a headless environment osmesa is being
> used. This has been working great for many years.
> We are now in the process of updating Mesa3D from the 10.5 series and
> now there seem to be issues with osmesa/swrast. We used to compile
> osmesa with the following lines (both on windows and linux):
> scons build=release openmp=true osmesa
> This gave us a single .so/.dll that contained all necessary OSMesa and
> GL symbols  and we could just link it in order to use it.
> However, starting with Mesa 11.6.0 this doesn’t work anymore.
> On linux the osmesa.so created does not contain any OSMesa and GL
> symbols (e.g. neither OSMesaCreateContext nor glLoadIdentity). By the
> way the osmesa.so is now put in
> „build/linux-x86_64/gallium/targets/osmesa“ instead of
> „build/linux-x86_64/mesa/drivers/osmesa“ as in previous versions.

At some point, the SCons build changed from building the old/swrast 
version of OSMesa to building the new gallium-based OSMesa.  Actually, 
the commit in question was 69db4222 (from March 24, 2015).

> On windows, the new osmesa.dll only contains the OSMesa specific symbols
> but non of the GL symbols:
> C:\>dumpbin /EXPORTS
> build\windows-x86-debug\gallium\targets\osmesa\osmesa.dll

For both Windows and Linux, the solutions is to probably also link your 
app with the GL library (libGL.so or opengl32.dll).  Can you try that?

> So my question is: using the latest mesa versions, how can I compile
> osmesa with swrast on linux and windows and get libraries as in pre 10.6
> versions (last one working is 10.5.9)?

With the gallium version of OSMesa, you'll probably want to use the 
llvmpipe driver.  It should be much faster than the old swrast driver if 
you use any amount of shaders/texturing.  However, this does require 
having LLVM installed on your machine.


More information about the mesa-users mailing list