1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-15 16:29:16 +01:00

[util] Implement dxvk:🧵:hardware_concurrency

This commit is contained in:
Philip Rebohle 2018-09-10 17:02:51 +02:00
parent c3b542878c
commit 6532302e34
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -107,6 +107,12 @@ namespace dxvk {
&& m_thread->joinable(); && m_thread->joinable();
} }
static uint32_t hardware_concurrency() {
SYSTEM_INFO info = { };
::GetSystemInfo(&info);
return info.dwNumberOfProcessors;
}
private: private:
Rc<ThreadFn> m_thread; Rc<ThreadFn> m_thread;