From 729660474623a72b1e93d09a583b9bffe9e15afd Mon Sep 17 00:00:00 2001 From: GPUCode Date: Sat, 6 Apr 2024 13:49:29 +0300 Subject: [PATCH] vk_pipeline_cache: Reduce worker threads * Using so many threads might starve other system work, especially if pipelines take way to long --- src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 9668aed69..05468777e 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -82,7 +82,7 @@ constexpr std::array SHADOW_BINDINGS = {{ PipelineCache::PipelineCache(const Instance& instance_, Scheduler& scheduler_, RenderpassCache& renderpass_cache_, DescriptorPool& pool_) : instance{instance_}, scheduler{scheduler_}, renderpass_cache{renderpass_cache_}, pool{pool_}, - num_worker_threads{std::max(std::thread::hardware_concurrency(), 2U)}, + num_worker_threads{std::max(std::thread::hardware_concurrency() >> 1, 2U)}, workers{num_worker_threads, "Pipeline workers"}, descriptor_set_providers{DescriptorSetProvider{instance, pool, BUFFER_BINDINGS}, DescriptorSetProvider{instance, pool, TEXTURE_BINDINGS},