mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 21:01:37 +00:00
Dynamically create pipeline threads depending on hardware concurrency.
This commit is contained in:
parent
c34198e48a
commit
2f343bcab7
1 changed files with 10 additions and 12 deletions
|
|
@ -4453,18 +4453,16 @@ static void PipelineCompilerThread()
|
|||
}
|
||||
}
|
||||
|
||||
static std::thread g_pipelineCompilerThread(PipelineCompilerThread);
|
||||
static std::thread g_pipelineCompilerThread1(PipelineCompilerThread);
|
||||
static std::thread g_pipelineCompilerThread2(PipelineCompilerThread);
|
||||
static std::thread g_pipelineCompilerThread3(PipelineCompilerThread);
|
||||
static std::thread g_pipelineCompilerThread4(PipelineCompilerThread);
|
||||
static std::thread g_pipelineCompilerThread5(PipelineCompilerThread);
|
||||
static std::thread g_pipelineCompilerThread6(PipelineCompilerThread);
|
||||
static std::thread g_pipelineCompilerThread7(PipelineCompilerThread);
|
||||
static std::thread g_pipelineCompilerThread8(PipelineCompilerThread);
|
||||
static std::thread g_pipelineCompilerThread9(PipelineCompilerThread);
|
||||
static std::thread g_pipelineCompilerThread10(PipelineCompilerThread);
|
||||
static std::thread g_pipelineCompilerThread11(PipelineCompilerThread);
|
||||
static std::vector<std::unique_ptr<std::thread>> g_pipelineCompilerThreads = []()
|
||||
{
|
||||
size_t threadCount = std::max(2u, (std::thread::hardware_concurrency() * 2) / 3);
|
||||
|
||||
std::vector<std::unique_ptr<std::thread>> threads(threadCount);
|
||||
for (auto& thread : threads)
|
||||
thread = std::make_unique<std::thread>(PipelineCompilerThread);
|
||||
|
||||
return threads;
|
||||
}();
|
||||
|
||||
static constexpr uint32_t MODEL_DATA_VFTABLE = 0x82073A44;
|
||||
static constexpr uint32_t TERRAIN_MODEL_DATA_VFTABLE = 0x8211D25C;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue