[Mesa-users] Gallium llvmpipe driver not using multiple cores on Windows

Steve Darnell darnells at dnastar.com
Fri Apr 11 16:26:53 PDT 2014


Greetings,

I am using the cross-compilation instructions from the QT project to build the Gallium llvmpipe software driver for Windows (Mesa 10.0.4, LLVM 3.4, x86): http://qt-project.org/wiki/Cross-compiling-Mesa-for-Windows. I am building on Linux Mint 14 (based on Ubuntu 12.10). The purpose is to replace the Microsoft OpenGL software drive with the Mesa version when my program is used in a Remote Desktop (RDP) session.

The build is successful and the resulting driver renders my graphics properly. However, I noticed that only one CPU thread is used by my program for OpenGL rendering rather than using my eight available CPU threads (my processor is an Intel Core i7 Sandybridge processor with four hyperthreaded cores). I am hoping that this is a simple build configuration issue; however, I have been unsuccessful identifying a solution.

Has anyone experienced this issue or have some suggestions to try? The script I am using for the build process is copied below.

Best regards,
Steve

--
#!/bin/bash
# Cross compiling Mesa for Windows on Linux
# http://qt-project.org/wiki/Cross-compiling-Mesa-for-Windows
#
# Required packages (Debian/Ubuntu):
# sudo apt-get install coreutils wget tar build-essential mingw-w64 libxml2 python scons flex bison

set -o nounset # no uninitialized variables
set -o errexit # exit on error

# user-editable parameters
LLVM_VER=3.4
MESA_VER=10.0.4

# global variables
LLVM_SRC=llvm-$LLVM_VER
LLVM_DIST=$LLVM_SRC.win32
MESALIB=MesaLib-$MESA_VER
MESA_SRC=Mesa-$MESA_VER
MESA_DIST=$MESA_SRC.win32
ROOT_DIR=$PWD

echo Clean prior build...
rm -rf $LLVM_SRC $LLVM_DIST $MESA_SRC $MESA_DIST

echo Download LLVM and Mesa sources...
if [ ! -f $LLVM_SRC.src.tar.gz ]; then
                wget http://llvm.org/releases/$LLVM_VER/$LLVM_SRC.src.tar.gz
fi
if [ ! -f $MESALIB.tar.gz ]; then
                wget ftp://ftp.freedesktop.org/pub/mesa/$MESA_VER/$MESALIB.tar.gz
fi

echo Extract sources...
tar xzf $LLVM_SRC.src.tar.gz
tar xzf $MESALIB.tar.gz

echo Build LLVM...
export PYTHON=/usr/bin/python2
mkdir $LLVM_SRC/build
cd $LLVM_SRC/build
# Note: Use of the strerror_s function is disabled by writing an entry to config.cache for Windows XP compatibility.
echo 'ac_cv_have_decl_strerror_s=${ac_cv_have_decl_strerror_s=no}' > config.cache
../configure -C --prefix=$ROOT_DIR/$LLVM_DIST --host=i686-w64-mingw32 --enable-optimized --disable-assertions --disable-pthreads --enable-targets=x86 --enable-bindings=none --disable-libffi --with-c-include-dirs=/usr/i686-w64-mingw32 --with-gcc-toolchain=/usr/i686-w64-mingw32 --with-default-sysroot=/usr/i686-w64-mingw32
make
make install

echo Build Mesa...
export LLVM=$ROOT_DIR/$LLVM_DIST
mkdir $ROOT_DIR/$MESA_DIST
cd $ROOT_DIR/$MESA_SRC
LDFLAGS="-static -s" scons build=release platform=windows toolchain=crossmingw machine=x86 libgl-gdi
cp -a build/windows-x86/gallium/targets/libgl-gdi/opengl32.dll $ROOT_DIR/$MESA_DIST

echo $MESA_SRC build successful: $ROOT_DIR/$MESA_DIST/opengl32.dll
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-users/attachments/20140411/6ab4b09e/attachment-0001.html>


More information about the mesa-users mailing list