From 6532302e343975d9c2c390e273e0efe91501dcb7 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 10 Sep 2018 17:02:51 +0200 Subject: [PATCH] [util] Implement dxvk::thread::hardware_concurrency --- src/util/thread.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util/thread.h b/src/util/thread.h index 46cb3213..f0c89483 100644 --- a/src/util/thread.h +++ b/src/util/thread.h @@ -106,6 +106,12 @@ namespace dxvk { return m_thread != nullptr && m_thread->joinable(); } + + static uint32_t hardware_concurrency() { + SYSTEM_INFO info = { }; + ::GetSystemInfo(&info); + return info.dwNumberOfProcessors; + } private: