3cd579208ba770a9d7791ea71a7286086981bb2b
Adds a SPIR-V cache that skips frontend compilation for shaders that are already compiled in a previous run of Blender. Initially this was postponed to 4.4 but it was observed that the vulkan backend didn't perform well on Windows in debug builds. The reason is that the compiler would also be a debug build which makes compiling a shader really slow. Starting Blender on a debug build could take minutes. So the decision was made to give this task a higher priority so the vulkan backend would become more usable to developers as well. The cache is stored in the application cache dir. The SPIR-V binaries can be used by different Blender versions so there is no version specific cache folder. **Sidecar**: SPIR-V files are a stream of bytes. There is no header information that allow us to validate the stream. To add basic validations we could add our custom header or a sidecar. It was chosen to use a sidecar as having the SPIR-V files unmodified allows us to load them directly in debug tools for analyzing. **Retention**: Shaders that are not used are automatically removed with a retention period of 30 days. **Shader builder**: Shader builder cannot use the SPIR-V cache as it uses stubs that returns invalid cache directories. This would load/save the cache to the location where you started the build. Pull Request: https://projects.blender.org/blender/blender/pulls/128741
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
