Dota 2 Windows binary under Wine 1.6
Startup: 35 secs (over ntfs3g userspace fs driver that is not that fast)
FPS: 37.5 FPS
Power usage LP mode (patched wine): 34W
Dota 2 Linux native
Startup: 1 min 14 secs (native ext4)
Mem: 2.6 GB
FPS: 40 FPS
Dota 2 Windows native - Windows 7
Startup: 25 secs
Mem: 1.2GB (measured by Windows Task manager)
FPS: 80 FPS
Power usage LP mode: 24W
CPU: Core i5 3320M
GPU settings (same on all Dota 2 versions): shadows MEDIUM, textures HIGH, render quality: HIGHEST, all other: OFF, vsync: disabled
GPU settings LP mode (for power measurments above): Shadowd low, effects OFF, textures MED, render quality: LOWEST, fpx_max: 30
Mesa version: git-8b5b5fe (with rendering regression fix from here: https://bugs.freedesktop.org/show_bug.cgi?id=67887)
Linux distro: Ubuntu 13.10, kernel 3.11 drm-intel-nightly, running LXDE
FPS Benchmark method:
in "dota 2 beta/dota/cfg/autoexec.cfg"
For FPS measurement number: look at the last 240 frames when the demo is ending
Memory measuring: RES column with `top`
Startup time measuring: stopwatch until the map is loaded
Analysis of the apitrace trace file:
I've made a trace of Dota 2 with apitrace, revealing possible performance issues.
Before the first frame of the game is drawn 11038 shaders are compiled. That is most likely why the load time is so slow and memory usage is so high. In addition a lot of the shaders being used seem to be recompiled by the Intel driver when rendering frames.
There are 162 frames in the trace I've analyzed, 193 shader recompiles, and 643 different shader programs (each program has 1 VS and 1 FS) used.
In contrast, Wine version of Dota 2 compiles only 220 shaders.
Performance feedback from the Intel driver:
glretrace of apitrace prints driver performance warnings. A sample of some that repeat every frame. These include shader recompile warnings.
575332: glDebugOutputCallback: Medium severity API performance issue 13, Clear color unsupported by fast color clear. Falling back to slow clear.
576094: glDebugOutputCallback: Medium severity API performance issue 14, Failed to fast clear depth due to scissor being enabled. Possible 5% performance win if avoided.
577739: glDebugOutputCallback: Medium severity API performance issue 4, Using a blit copy to avoid stalling on 480b glBufferSubData() to a busy buffer object.
577801: glDebugOutputCallback: Medium severity API performance issue 8, Recompiling vertex shader for program 7901
577801: glDebugOutputCallback: Medium severity API performance issue 9, Didn't find previous compile in the shader cache for debug
577801: glDebugOutputCallback: Medium severity API performance issue 1, Recompiling fragment shader for program 7901
577801: glDebugOutputCallback: Medium severity API performance issue 10, Didn't find previous compile in the shader cache for debug
577801: glDebugOutputCallback: Medium severity API performance issue 3, FS compile took 2.266 ms and stalled the GPU
Warnings in sequence in URL below:
It's interesting that most of this warnings were added by request of Valve back in 2012:
If you have a memory constrained machine and want to run under Linux, maybe using Wine is a better choice.
I hope Valve cares enough about Linux to fix what they can on their side and work with folks from Intel to fix their performance problems.
You will probably be luckier if you run it on nVidia GPU, since people in general are claiming performance very similar to Windows. Though probably still with slower startup times and higher mem usage.
Some info on how to compile Mesa 32 bit on 64bit Ubuntu:
Unfortunately this doesn't work with old Ubuntu versions, just with 13.10. For old version you must also remove 64 bit versions of the compiler, which was a bit too much of a requirement for me.
apt-get install gcc-multilib g++-multilib binutils-multiarch libx11-dev:i386 libdrm-dev:i386
and as configure complains install others
apt-get build-dep mesa -ai386
wants to install too much and remove some 64 bit stuff I need, and we don't actually need llvm i386 dev stuff for compiling just the Intel driver.
I use this script to compile just the i965 driver for mesa:
export CFLAGS="-m32 -O3 -mtune=native -march=native -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security"
export CXXFLAGS="-m32 -O3 -mtune=native -march=native -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security"
./configure --disable-egl --enable-glx-tls --with-gallium-drivers= --with-dri-drivers=i965 --enable-32-bit