summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-08-13 23:06:57 +0200
committerGitHub <noreply@github.com>2020-08-13 23:06:57 +0200
commita9de967fa3bf88666bb63b1228b16a82b6e2a6fb (patch)
tree0d1e8f41db24d8c9763d5daa77735d3514658c91 /src/video_core
parentMerge pull request #4511 from lioncash/build2 (diff)
parentgl_shader_cache: Use std::max() for determining num_workers (diff)
downloadyuzu-a9de967fa3bf88666bb63b1228b16a82b6e2a6fb.tar
yuzu-a9de967fa3bf88666bb63b1228b16a82b6e2a6fb.tar.gz
yuzu-a9de967fa3bf88666bb63b1228b16a82b6e2a6fb.tar.bz2
yuzu-a9de967fa3bf88666bb63b1228b16a82b6e2a6fb.tar.lz
yuzu-a9de967fa3bf88666bb63b1228b16a82b6e2a6fb.tar.xz
yuzu-a9de967fa3bf88666bb63b1228b16a82b6e2a6fb.tar.zst
yuzu-a9de967fa3bf88666bb63b1228b16a82b6e2a6fb.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp2
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);