High Resolution Rendering

To get VisIt to render images larger than 16384^2, you'll need to custom compile Mesa.

Mesa version

It is highly recommended that you use Mesa version 7.6 or higher. Using an earlier version changes the 'configuration' step in ways which are not documented here. You can obtain Mesa from www.mesa3d.org.

Using later versions of Mesa than VisIt ships is generally safe. A VisIt developer is regularly testing with various Mesa versions and ensuring there are no serious regressions.

Configuration

Use the autoconf build system to configure Mesa. Due to a quirk of the VTK build system, we must currently build Mesa in multiple configurations.

Extract Mesa, cd into the directory, and run:

# pass 1: glX Mesa.
./configure \
  CFLAGS="${CFLAGS} -DUSE_MGL_NAMESPACE" \
  CXXFLAGS="${CXXFLAGS} -DUSE_MGL_NAMESPACE" \
  --prefix=/path/to/somewhere \
  --without-demos \
  --disable-gallium \
  --with-driver=xlib \
  --enable-gl-osmesa \
  --disable-glw \
  --disable-glu \
  --disable-egl \
  --with-max-width=32768 \
  --with-max-height=32768
cat configs/autoconf | \
  sed -e "s,GL_LIB = GL,GL_LIB=MesaGL,g" > \
  configs/autoconf.edit || exit 1
mv configs/autoconf.edit configs/autoconf
cat configs/autoconf | \
  sed -e "s,GLU_LIB = GLU,GLU_LIB=MesaGLU,g" > \
  configs/autoconf.edit || exit 1
mv configs/autoconf.edit configs/autoconf

make -j3
make install

# pass 2: OSMesa (what VisIt uses)
./configure \
  CFLAGS="${CFLAGS} -DUSE_MGL_NAMESPACE" \
  CXXFLAGS="${CXXFLAGS} -DUSE_MGL_NAMESPACE" \
  --prefix=/path/to/somewhere \
  --without-demos \
  --disable-gallium \
  --with-driver=osmesa \
  --disable-glw \
  --disable-glu \
  --disable-egl \
  --with-max-width=32768 \
  --with-max-height=32768
cat configs/autoconf | \
  sed -e "s,GL_LIB = GL,GL_LIB=MesaGL,g" > \
  configs/autoconf.edit || exit 1
mv configs/autoconf.edit configs/autoconf
cat configs/autoconf | \
  sed -e "s,GLU_LIB = GLU,GLU_LIB=MesaGLU,g" > \
  configs/autoconf.edit || exit 1
mv configs/autoconf.edit configs/autoconf

make -j3
make install

The above assumes you want the maximum image size to be 32768x32768; adjust accordingly.

Integrating with build_visit

The build_visit script can build Mesa for you, but will not know about your custom resolution requirements. You have multiple options here: one is to modify build_visit to pass those options so that it can build Mesa correctly. This is not a good long term solution though: you'll have to re-integrate the change with the next VisIt release, and you'll forget what you did.

A better solution is to let build_visit build Mesa incorrectly, and then overwrite its Mesa with the one you installed.

To do this, run build_visit with the --no-visit option. Then run the script given above, replacing /path/to/somewhere with visit/mesa/${version}/${osjunk}, where ${version} is the version of Mesa build_visit is using and ${osjunk} is the OS and compiler string that build_visit adds on its own. You should be able to tab-complete this directory in your shell, since the build_visit invocation created it. Do not worry if ${version} does not match the Mesa version you want to use; it's just a directory name.

After you've done that, rerun build_visit after removing VTK:

rm -fr VTK visit/vtk && bash build_visit ${your-normal-opts}

You don't need --no-visit this time. build_visit will notice that you already have Mesa installed and not attempt to rebuild it.

Drawbacks to enabling high resolution rendering

Increasing the maximum resolution has an effect on the quality of Mesa's rasterization step. This could, for example, lead to more jagged edges on some polygons.

You can read the discussion about this online. As mentioned in that thread, further details are available in Mesa's source code. The VisIt developers also discussed this (it's what prompted the change in Mesa).