View source in Mesa


A High Performance, Highly Scalable Software Rasterizer for OpenGL

For more information please send us an email.

Linux Build Instructions

On Linux, OpenSWR is built using the standard autoconf package as described here, with the addition of "swr" to the list of gallium drivers. Mesa requires some additional packages to build. Please follow the Mesa instructions and make sure you install them. One of the major Mesa requirements is LLVM, but with some additional flags required.

The instructions below describe how to compile Mesa using the Mesa released tarballs. Compiling directly from the git repository is more complicated and is beyond the scope of these instructions. If you want to compile from the git repository and you have problems, please contact us directly.

  • Download and unpack mesa. Please follow the instructions in
  • cd into the directory you just extracted. (the root of the mesa distribution)
  • Optional: If you don't have llvm installed, follow the steps below to install llvm, after you've downloaded it from the llvm website . Please complete the make command with the correct -j parameter for your system
      mkdir llvm
      cd llvm
      tar xfJ /path/to/llvm-x.y.z.src.tar.xz
      mkdir build root
      cd build
      cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DBUILD_SHARED_LIBS=1 -DLLVM_ENABLE_RTTI=1 -DCMAKE_INSTALL_PREFIX=$PWD/../root  ../llvm-x.y.z.src
      make -j10
      make install
      cd ..
      # Allow the mesa build to locate llvm
      export PATH=$PATH:$PWD/root/bin
      export LD_LIBRARY_PATH=$PWD/root/lib
      cd ..
  • Configure the mesa build with OpenSWR
      ../configure --disable-dri --disable-egl --disable-gbm --with-gallium-drivers=swrast,swr --with-platforms=x11
    If you have VL in your system, you will need to also pass the following flags:
      --disable-xvmc --disable-vdpau --disable-omx --disable-va
    If you want to compile OSMesa, please add the following flags:
  • Build mesa as follows. As with the llvm build, pass in the correct -j parameter to make for your system
      make -j10
  • The resulting libraries are in the lib/gallium directory.

    Please feel free to modify the above instructions to fit your needs.