summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernandoS27 <fsahmkow27@gmail.com>2021-04-03 02:27:25 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:26 +0200
commit480dc0d5e68fd1c79345e93216013a1d2e172c70 (patch)
tree8fadf3ac0163bce76183bfe3f1590d45a014e539
parentshader: Address Feedback (diff)
downloadyuzu-480dc0d5e68fd1c79345e93216013a1d2e172c70.tar
yuzu-480dc0d5e68fd1c79345e93216013a1d2e172c70.tar.gz
yuzu-480dc0d5e68fd1c79345e93216013a1d2e172c70.tar.bz2
yuzu-480dc0d5e68fd1c79345e93216013a1d2e172c70.tar.lz
yuzu-480dc0d5e68fd1c79345e93216013a1d2e172c70.tar.xz
yuzu-480dc0d5e68fd1c79345e93216013a1d2e172c70.tar.zst
yuzu-480dc0d5e68fd1c79345e93216013a1d2e172c70.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
index 1f308eec2..3111165fb 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
@@ -539,11 +539,13 @@ void PipelineCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading
ShaderPools pools;
auto pipeline{CreateComputePipeline(pools, key, envs.front(), false)};
- std::lock_guard lock{state.mutex};
- compute_cache.emplace(key, std::move(pipeline));
- ++state.built;
- if (state.has_loaded) {
- callback(VideoCore::LoadCallbackStage::Build, state.built, state.total);
+ {
+ std::lock_guard lock{state.mutex};
+ compute_cache.emplace(key, std::move(pipeline));
+ ++state.built;
+ if (state.has_loaded) {
+ callback(VideoCore::LoadCallbackStage::Build, state.built, state.total);
+ }
}
});
} else {
@@ -558,11 +560,13 @@ void PipelineCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading
}
auto pipeline{CreateGraphicsPipeline(pools, key, MakeSpan(env_ptrs), false)};
- std::lock_guard lock{state.mutex};
- graphics_cache.emplace(key, std::move(pipeline));
- ++state.built;
- if (state.has_loaded) {
- callback(VideoCore::LoadCallbackStage::Build, state.built, state.total);
+ {
+ std::lock_guard lock{state.mutex};
+ graphics_cache.emplace(key, std::move(pipeline));
+ ++state.built;
+ if (state.has_loaded) {
+ callback(VideoCore::LoadCallbackStage::Build, state.built, state.total);
+ }
}
});
}