Brussels / 2 & 3 February 2019


Reducing Memory Usage of Mesa's Shader Compiler (Again)

Why does this shader need 80GiB to compile?

During recent work to implement software double precision (fp64) support in Mesa's shading language compiler, some shaders were found to use excessive amounts of memory. One pessimal test case used over 80GiB. This talk will discuss techniques that were used to reduce that memory usage to less the 2GiB. This reduction was achieved through a combination of optimizing existing data structures, use of more compact data structures, and improved memory management. Use of tools such as Valgrind and pahole will be covered.


Photo of Ian Romanick Ian Romanick