diff options
author | Krzysztof Bogacki <krzysztof.bogacki@leancode.pl> | 2022-06-25 22:42:54 +0300 |
---|---|---|
committer | Jens Peters <jp7677@gmail.com> | 2022-06-26 00:27:14 +0300 |
commit | 8ba4401eb7d0e52c672654c2eec8203ffc0a8ca9 (patch) | |
tree | f76f1742791557f256f69f1c1bad380f803703b3 | |
parent | 8385c57585131514d091642287d02216c8561ce8 (diff) |
nvml: Load and expose DeviceGetNumGpuCores
-rw-r--r-- | src/sysinfo/nvml.cpp | 7 | ||||
-rw-r--r-- | src/sysinfo/nvml.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/sysinfo/nvml.cpp b/src/sysinfo/nvml.cpp index 7bea09d..c4ce9d3 100644 --- a/src/sysinfo/nvml.cpp +++ b/src/sysinfo/nvml.cpp @@ -27,6 +27,7 @@ namespace dxvk { GETPROCADDR(nvmlDeviceGetPerformanceState); GETPROCADDR(nvmlDeviceGetUtilizationRates); GETPROCADDR(nvmlDeviceGetVbiosVersion); + GETPROCADDR(nvmlDeviceGetNumGpuCores); GETPROCADDR(nvmlDeviceGetBusType); GETPROCADDR(nvmlDeviceGetDynamicPstatesInfo); @@ -112,6 +113,12 @@ namespace dxvk { : NVML_ERROR_FUNCTION_NOT_FOUND; } + nvmlReturn_t Nvml::DeviceGetNumGpuCores(nvmlDevice_t device, unsigned int* numCores) const { + return m_nvmlDeviceGetNumGpuCores + ? m_nvmlDeviceGetNumGpuCores(device, numCores) + : NVML_ERROR_FUNCTION_NOT_FOUND; + } + nvmlReturn_t Nvml::DeviceGetBusType(nvmlDevice_t device, nvmlBusType_t* type) const { return m_nvmlDeviceGetBusType ? m_nvmlDeviceGetBusType(device, type) diff --git a/src/sysinfo/nvml.h b/src/sysinfo/nvml.h index 6310c82..d8d7a36 100644 --- a/src/sysinfo/nvml.h +++ b/src/sysinfo/nvml.h @@ -19,6 +19,7 @@ namespace dxvk { [[nodiscard]] virtual nvmlReturn_t DeviceGetPerformanceState(nvmlDevice_t device, nvmlPstates_t* pState) const; [[nodiscard]] virtual nvmlReturn_t DeviceGetUtilizationRates(nvmlDevice_t device, nvmlUtilization_t* utilization) const; [[nodiscard]] virtual nvmlReturn_t DeviceGetVbiosVersion(nvmlDevice_t device, char* version, unsigned int length) const; + [[nodiscard]] virtual nvmlReturn_t DeviceGetNumGpuCores(nvmlDevice_t device, unsigned int* numCores) const; [[nodiscard]] virtual nvmlReturn_t DeviceGetBusType(nvmlDevice_t device, nvmlBusType_t* type) const; [[nodiscard]] virtual nvmlReturn_t DeviceGetDynamicPstatesInfo(nvmlDevice_t device, nvmlGpuDynamicPstatesInfo_t* pDynamicPstatesInfo) const; @@ -43,6 +44,7 @@ namespace dxvk { DECLARE_PFN(nvmlDeviceGetPerformanceState); DECLARE_PFN(nvmlDeviceGetUtilizationRates); DECLARE_PFN(nvmlDeviceGetVbiosVersion); + DECLARE_PFN(nvmlDeviceGetNumGpuCores); DECLARE_PFN(nvmlDeviceGetBusType); DECLARE_PFN(nvmlDeviceGetDynamicPstatesInfo); |