1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 10:54:16 +01:00

[dxvk] Set low thread priority for pipeline compiler threads

This currently does not have any effect when using regular wine, but
if it ever gets supported then these background jobs should have less
of an influence on the game's performance when they kick in.
This commit is contained in:
Philip Rebohle 2018-11-15 12:19:24 +01:00
parent 305168d2bb
commit d49de734b7
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -74,8 +74,10 @@ namespace dxvk {
Logger::info(str::format("DXVK: Using ", numWorkers, " compiler threads"));
// Start the worker threads and the file writer
for (uint32_t i = 0; i < numWorkers; i++)
for (uint32_t i = 0; i < numWorkers; i++) {
m_workerThreads.emplace_back([this] () { workerFunc(); });
m_workerThreads[i].set_priority(ThreadPriority::Lowest);
}
m_writerThread = dxvk::thread([this] () { writerFunc(); });
}