mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxvk] Tweak number of pipeline compiler threads
Gives some 6-core and 8-core CPUs a bit more breathing room, while also supporting up to 32 workers instead of just 16 to leverage the new high core count Ryzen CPUs.
This commit is contained in:
parent
47555f1dda
commit
cd00719122
@ -154,12 +154,10 @@ namespace dxvk {
|
|||||||
|
|
||||||
// Use half the available CPU cores for pipeline compilation
|
// Use half the available CPU cores for pipeline compilation
|
||||||
uint32_t numCpuCores = dxvk::thread::hardware_concurrency();
|
uint32_t numCpuCores = dxvk::thread::hardware_concurrency();
|
||||||
uint32_t numWorkers = numCpuCores > 8
|
uint32_t numWorkers = ((std::max(1u, numCpuCores) - 1) * 5) / 7;
|
||||||
? numCpuCores * 3 / 4
|
|
||||||
: numCpuCores * 1 / 2;
|
|
||||||
|
|
||||||
if (numWorkers < 1) numWorkers = 1;
|
if (numWorkers < 1) numWorkers = 1;
|
||||||
if (numWorkers > 16) numWorkers = 16;
|
if (numWorkers > 32) numWorkers = 32;
|
||||||
|
|
||||||
if (device->config().numCompilerThreads > 0)
|
if (device->config().numCompilerThreads > 0)
|
||||||
numWorkers = device->config().numCompilerThreads;
|
numWorkers = device->config().numCompilerThreads;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user