Add toggle for enabling or disabling RenderingDevice's pipeline cache.

This commit is contained in:
Dario 2024-04-05 13:00:20 -03:00
parent 655e93d584
commit ecaafa6001
3 changed files with 7 additions and 1 deletions

View file

@ -5089,7 +5089,8 @@ Error RenderingDevice::initialize(RenderingContextDriver *p_context, DisplayServ
draw_list = nullptr;
compute_list = nullptr;
if (main_instance) {
bool project_pipeline_cache_enable = GLOBAL_GET("rendering/rendering_device/pipeline_cache/enable");
if (main_instance && project_pipeline_cache_enable) {
// Only the instance that is not a local device and is also the singleton is allowed to manage a pipeline cache.
pipeline_cache_file_path = vformat("user://vulkan/pipelines.%s.%s",
OS::get_singleton()->get_current_rendering_method(),