Files
fastfetch/src/detection/gpu/gpu.h
T

47 lines
950 B
C
Raw Normal View History

2022-09-05 17:42:42 +02:00
#pragma once
#ifndef FF_INCLUDED_detection_gpu_gpu
#define FF_INCLUDED_detection_gpu_gpu
#include "fastfetch.h"
#define FF_GPU_TEMP_UNSET (0/0.0)
2022-09-16 18:11:39 +08:00
#define FF_GPU_CORE_COUNT_UNSET -1
#define FF_GPU_VMEM_SIZE_UNSET ((uint64_t)-1)
2022-09-05 17:42:42 +02:00
2023-02-06 11:07:49 +08:00
extern const char* FF_GPU_VENDOR_NAME_APPLE;
extern const char* FF_GPU_VENDOR_NAME_AMD;
extern const char* FF_GPU_VENDOR_NAME_INTEL;
extern const char* FF_GPU_VENDOR_NAME_NVIDIA;
2022-11-22 19:25:49 +08:00
2023-01-12 11:41:07 +01:00
typedef enum FFGpuType
{
FF_GPU_TYPE_UNKNOWN,
2023-01-12 11:41:07 +01:00
FF_GPU_TYPE_INTEGRATED,
FF_GPU_TYPE_DISCRETE,
} FFGpuType;
2023-02-11 12:34:57 +08:00
typedef struct FFGPUMemory
{
uint64_t total;
uint64_t used;
} FFGPUMemory;
2022-09-05 17:42:42 +02:00
typedef struct FFGPUResult
{
2023-01-12 11:41:07 +01:00
FFGpuType type;
2022-09-05 17:42:42 +02:00
FFstrbuf vendor;
FFstrbuf name;
FFstrbuf driver;
double temperature;
2022-09-16 18:11:39 +08:00
int coreCount;
2023-02-11 12:34:57 +08:00
FFGPUMemory dedicated;
FFGPUMemory shared;
2022-09-05 17:42:42 +02:00
} FFGPUResult;
const FFlist* ffDetectGPU(const FFinstance* instance);
2023-02-06 11:07:49 +08:00
const char* ffGetGPUVendorString(unsigned vendorId);
2022-09-05 17:42:42 +02:00
#endif