From fc0812061e6cf14d9ec30ef0c3ce7c26311d5289 Mon Sep 17 00:00:00 2001 From: Herman Semenoff Date: Mon, 23 Mar 2026 02:56:46 +0300 Subject: [PATCH] threadmanager: remove detect cpu max 16 threads for compute Removing restrictions greatly improves performance software rendering on multi-core systems above 16 threads. --- Common/Thread/ThreadManager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Common/Thread/ThreadManager.cpp b/Common/Thread/ThreadManager.cpp index efd35f3f26..a98f78ced5 100644 --- a/Common/Thread/ThreadManager.cpp +++ b/Common/Thread/ThreadManager.cpp @@ -20,7 +20,6 @@ // * For some tasks, splitting the input values up linearly between the threads // is not fair. However, we ignore that for now. -const int MAX_CORES_TO_USE = 16; const int MIN_IO_BLOCKING_THREADS = 4; static constexpr size_t TASK_PRIORITY_COUNT = (size_t)TaskPriority::COUNT; @@ -219,8 +218,8 @@ void ThreadManager::Init(int numRealCores, int numLogicalCoresPerCpu) { if (IsInitialized()) { Teardown(); } - - numComputeThreads_ = std::min(numRealCores * numLogicalCoresPerCpu, MAX_CORES_TO_USE); + + numComputeThreads_ = numRealCores * numLogicalCoresPerCpu; // Double it for the IO blocking threads. int numThreads = numComputeThreads_ + std::max(MIN_IO_BLOCKING_THREADS, numComputeThreads_); numThreads_ = numThreads;