remove nvidiaSmiThread

pull/20/head
telans 4 years ago
parent 97fcafd030
commit 1bc513f572
No known key found for this signature in database
GPG Key ID: 195444EE92DBCB20

@ -22,7 +22,7 @@ int gpuLoad = 0, gpuTemp = 0, cpuTemp = 0, gpuMemUsed = 0, gpuMemTotal = 0;
FILE *amdGpuFile = nullptr, *amdTempFile = nullptr, *cpuTempFile = nullptr, *amdGpuVramTotalFile = nullptr, *amdGpuVramUsedFile = nullptr;
int numCpuCores = std::thread::hardware_concurrency();
pthread_t cpuThread, gpuThread, cpuInfoThread, nvidiaSmiThread;
pthread_t cpuThread, gpuThread, cpuInfoThread;
struct amdGpu {
int load;
@ -78,7 +78,7 @@ void *getNvidiaGpuInfo(void *){
gpuMemUsed = nvidiaMemory.used / (1024 * 1024);
}
pthread_detach(nvidiaSmiThread);
pthread_detach(gpuThread);
return NULL;
}

@ -985,7 +985,7 @@ static void snapshot_swapchain_frame(struct swapchain_data *data)
if (device_data->gpu_stats) {
// get gpu usage
if (device_data->properties.vendorID == 0x10de)
pthread_create(&nvidiaSmiThread, NULL, &getNvidiaGpuInfo, NULL);
pthread_create(&gpuThread, NULL, &getNvidiaGpuInfo, NULL);
if (device_data->properties.vendorID == 0x1002)
pthread_create(&gpuThread, NULL, &getAmdGpuUsage, NULL);

Loading…
Cancel
Save