Recent Changes - Search:

TurboVNC Home

About TurboVNC

Downloads

Documentation

Reports

Developer Info

Contact

Related Projects

Using TurboVNC with Mesa

NOTE: TurboVNC 2.2 now includes a built-in software OpenGL implementation, thus rendering this procedure unnecessary, but the page is retained for historical purposes.

Although software OpenGL rendering will be much much slower than VirtualGL, in some cases it may be desirable to run simple OpenGL applications in TurboVNC on servers that do not have a GPU (and thus can't use VirtualGL.) This article explains how to accomplish that using Mesa.

Newer Linux Distros (RHEL 6+, Fedora, Ubuntu, etc.)

cd Mesa-*
autoreconf -fiv
./configure --enable-xlib-glx --disable-dri --disable-egl --disable-gbm --with-gallium-drivers=swrast --prefix=$HOME/mesa
make install
  • Add ~/mesa/lib to your LD_LIBRARY_PATH environment variable prior to running a 3D application.

NOTE: If building Mesa 12 or later, replace --enable-xlib-glx with --enable-glx=gallium-xlib.

Note that a custom build of Mesa is required because most vendor-supplied distributions of it do not include Mesa's X11 driver. This driver is what allows Mesa to execute all of the OpenGL commands in-process and convert them into plain Xlib calls.

Enabling llvmpipe

The Mesa llvmpipe driver implements shaders, rasterization primitives, and vertex processing using LLVM IR (intermediate representation) kernels that are translated into x86[-64] machine language at run time. The driver is also multi-threaded and supports x86 SIMD instructions, so it will generally be faster than the pure Xlib driver.

The above procedure will build the llvmpipe driver automatically if LLVM is installed (it is usually provided in a package called "llvm-devel" or "llvm-dev".) However, it will be necessary to perform some additional steps with Mesa 11 and earlier in order to enable llvmpipe at run time:

cd $HOME/mesa/lib
ln -fs libGL.so.1.5.0 libGL.so.1

NOTE: Building llvmpipe is known not to work with Mesa 9 and earlier when using LLVM 3.4, which is the current version available in RHEL as of this writing.

NOTE: It is recommended that you add --with-llvm-shared-libs to the configure flags if building Mesa 10.1.x or earlier. This is the default in later Mesa releases.

Older Linux Distros (RHEL 5, etc.)

The newest Mesa releases require newer build tools than are available on some legacy platforms. On RHEL/CentOS 5, specifically, you will have to use Mesa 7.8.2 or earlier and configure it as follows:

configure --with-driver=xlib --with-gallium-drivers=swrast --prefix=$HOME/mesa

Otherwise, however, the procedure is the same as above.

Cross-Compiling a 32-bit Version of Mesa on x86-64 Systems

If you have a 32-bit LLVM development package available, add

--host i686-pc-linux-gnu CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS='-m32 -L/usr/lib/llvm'

to the configure command line. If you don't have a 32-bit LLVM development package available, then add

--host i686-pc-linux-gnu CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32 --disable-gallium-llvm

to the configure command line.

Creative Commons LicenseAll content on this web site is licensed under the Creative Commons Attribution 2.5 License. Any works containing material derived from this web site must cite The VirtualGL Project as the source of the material and list the current URL for the TurboVNC web site.

Edit - History - Print - Recent Changes - Search
Page last modified on August 07, 2018, at 09:49 PM