Overhauling Mesa's GLSL Compiler Performance

Posted by Michael Larabel on November 12, 2009

We like hearing about performance improvements for Linux and also Linux graphics in general, but when there's something about performance improvements for Linux graphics, it certainly gets us excited and garners our interest. This time we get to report on work being done to Mesa's GLSL compiler, which is now running drastically faster in a branch of Mesa that will be published in about a week.

Intel's Ian Romanick has been working on optimizing GLSL IR and reworking the assembly shader (among other things) after ditching his efforts to write a new GLSL compiler, but VMware's Michal Krol has been rewriting the GLSL compiler pre-processor for Mesa as a step towards improving the GL Shading Language support and making it easier to strap in a new syntax parser in the future.

Once Michal wrote the new pre-processor, the existing syntax parser ended up being a huge bottleneck, and while Ian was going to be writing a new syntax parser, Michal ended up writing a new simple one. This new Mesa GLSL compiler syntax parser is similar in functionality to the "current" one, but it's much simpler and it's very fast.

Benchmarking was done of the new pre-processor and syntax parser for the Mesa GLSL compiler by measuring the time it takes to complete the two steps with an advanced shader. Michal's numbers show an impressive 27x speed-up with the new implementation over the old. Even more impressive, if simply measuring the performance of the new syntax parser, it's a 122x improvement over the current code in Mesa's master Git tree!

This code is being initially funneled into a branch of Mesa that will be called glsl-pp-rework-2 and VMware should make it available in about a week. The mailing list message detailing this pre-processor and syntax parsing work for Mesa's GLSL functionality can be found on mesa3d-dev.

  1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Peripherals
  7. Processors
  8. Software
  9. Linux Gaming
  10. Event Coverage
  11. All Categories
  1. Phoronix Media
  2. RadeonHD.org
  3. Cekora.com
  4. Foodstruments.com
  5. Phoronix Test Suite
  1. Featured Links
  2. dvd vierges shoxx.com
  3. Data Recovery Software
  4. Hughes Net Internet
  5. Free Trial for Anonymous Surfing Service
  6. Ciakl Falga Guide
  7. Chinni Muiie Carduba
  1. Affiliates
  2. Dedicated Server
  3. Web Hosting
  4. Dedicated Servers