diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-08-11 19:26:23 +0200 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-08-12 15:23:34 +0200 |
commit | e0ff98dd34d8180b7c2efc2142c40be83fd84725 (patch) | |
tree | df18e28fed5fbb24ebc4c125674669f6d6b63abe /src | |
parent | Merge pull request #4497 from lioncash/freezer-alg (diff) | |
download | yuzu-e0ff98dd34d8180b7c2efc2142c40be83fd84725.tar yuzu-e0ff98dd34d8180b7c2efc2142c40be83fd84725.tar.gz yuzu-e0ff98dd34d8180b7c2efc2142c40be83fd84725.tar.bz2 yuzu-e0ff98dd34d8180b7c2efc2142c40be83fd84725.tar.lz yuzu-e0ff98dd34d8180b7c2efc2142c40be83fd84725.tar.xz yuzu-e0ff98dd34d8180b7c2efc2142c40be83fd84725.tar.zst yuzu-e0ff98dd34d8180b7c2efc2142c40be83fd84725.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index be71e1733..eb49a36bf 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp @@ -403,7 +403,7 @@ void ShaderCacheOpenGL::LoadDiskCache(const std::atomic_bool& stop_loading, } }; - const auto num_workers{static_cast<std::size_t>(std::thread::hardware_concurrency() + 1ULL)}; + const std::size_t num_workers{std::max(1U, std::thread::hardware_concurrency())}; const std::size_t bucket_size{transferable->size() / num_workers}; std::vector<std::unique_ptr<Core::Frontend::GraphicsContext>> contexts(num_workers); std::vector<std::thread> threads(num_workers); |