This morning I mentioned that work from last year's Google Summer of Code project on improving the ATI Radeon R300 compiler for the Mesa Gallium3D driver had never stopped. Tom Stellard's latest R300 GLSL compiler work has been focused on improving the register allocator. Tom's initial figures showed roughly a 10% boost for software with intensive OpenGL shaders, but here is what my test results show for this yet-to-be-merged code.
This new R300 register allocator is based upon a register allocation algorithm previously committed by Intel's Eric Anholt in the Mesa code-base, which in turn is based upon an irregular architecture algorithm first published by Johan Runeson and Sven-Olof Nyström. This implementation is said to be a big help for programs that use GLSL shaders with lots of scalar values. Tom cited that Lightsmark uses 30~50% less registers when using this new R300 allocator and that boosted his frame-rate by about 10%. He sought other test results and benchmarks from other GPUs (he's just running an ATI RV515), so curiosity got the best of me this morning in checking out his new-register-allocator branch.
Testing was done with ATI Radeon X1800XL and ATI Radeon X1950PRO graphics cards. The performance of his latest new-register-allocator branch was compared to Mesa 7.11-devel Git master as of this weekend. The Linux 2.6.39, xf86-video-ati 6.14.99, and libdrm 2.4.24 Git were used as well. Testing was done on the Intel Sandy Bridge system with an Intel Core i5 2500K, Sapphire Pure Black P67 Hydra, 4GB of DDR3 system memory, 250GB Seagate SATA HDD, and 64-bit Ubuntu 10.10 as the base operating system.
On these faster R500-class GPUs than his RV515 (Radeon X1300 series), the performance improvements in games using shaders were not decisive. Even with Lightsmark, one of Stellard's cited examples as a test using many shaders with scalar values, there was a nice improvement for the X1950PRO but not under the X1800XL, so there may be a snag or greater bottleneck elsewhere in the driver. The other results, for what it's worth, can be found at OpenBenchmarking.org. With Lightsmark at 1920 x 1080, the new-register-allocator branch of Tom's Mesa code was 31% faster than mainline. Unfortunately, the slower Radeon X800XL and Radeon X1300PRO GPUs that were handy did not like the Sandy Bridge P67 motherboard. As a result, an old ThinkPad T60 with a Mobility Radeon X1400 was pulled out to see what the performance was like with the new register allocator.
This testing was again on Ubuntu 10.10 with the latest Linux kernel / Mesa / DDX / libdrm Git. Along with the Mobility Radeon X1400 on the T60 notebook is an Intel Core Duo T2400 CPU, 1GB of system memory, and an 80GB Hitachi SATA HDD. With the Mobility Radeon X1400, the Lightsmark performance was up by 9~10%, which is right in line with Tom's reported improvements, but other shader-using tests capable of running with the Gallium3D driver on the X1400 were unaffected. These results are also on OpenBenchmarking.org.
While the new register allocator for the open-source Mesa R300 driver may bring some performance improvements, the improvements do not seem to be across the board for the software using GLSL. In software that makes heavy use of shaders, the performance may be improved, but is still more than likely running at a crippled pace on Mesa / Gallium3D. Regardless, any and all improvements to Mesa are welcome.
Discuss this article in our forums, IRC channel, or email the author. You can also follow our content via RSS and on social networks like Facebook, Identi.ca, and Twitter (@Phoronix and @MichaelLarabel). Subscribe to Phoronix Premium to view our content without advertisements, view entire articles on a single page, and experience other benefits.