LunarG Adds New Size Option To Further Reduce Size Of SPIR-V
Written by Michael Larabel in Vulkan on 15 December 2017 at 03:19 PM EST. 2 Comments
LunarG has been working to reduce the size of the SPIR-V intermediate representation used by Vulkan (and OpenCL 2.1+) through improvements to the SPIRV-Tools project.

For easing the optimization process to yield the smallest generated SPIR-V code size as possible, LunarG has added a -Os switch -- just like what's found in GCC and other code compilers -- if wishing to run the optimization passes for minimum code size.

With the optimization passes set by -Os for dead code elimination, dropping unnecessary stores/loads, and replicated code, they are dropping the size of raw SPIR-V by 60%. LunarG says these SPIR-V sizes are now within 40% the size of Direct3D bytecode.

More details on LunarG's SPIR-V optimization work via this blog post while the work is now present in the latest SPIRV-Tools repository.
Related News
About The Author
Author picture

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter or contacted via

Popular News This Week