mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-24 09:33:06 +00:00
vk_pipeline_cache: Small fixes to the pipeline cache
This commit is contained in:
parent
baec84247f
commit
480dc0d5e6
1 changed files with 14 additions and 10 deletions
|
@ -539,12 +539,14 @@ 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);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
GraphicsPipelineCacheKey key;
|
||||
|
@ -558,12 +560,14 @@ 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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
++state.total;
|
||||
|
|
Loading…
Reference in a new issue