GPU: huge improvement of driver specific detection code

This commit is contained in:
李通洲
2023-12-20 14:45:27 +08:00
parent 961e9a6a5f
commit 4a1bbb6a03
13 changed files with 174 additions and 116 deletions
+4 -2
View File
@@ -5,6 +5,7 @@
#define FF_GPU_TEMP_UNSET (0/0.0)
#define FF_GPU_CORE_COUNT_UNSET -1
#define FF_GPU_VMEM_SIZE_UNSET ((uint64_t)-1)
#define FF_GPU_FREQUENCY_UNSET -1u
extern const char* FF_GPU_VENDOR_NAME_APPLE;
extern const char* FF_GPU_VENDOR_NAME_AMD;
@@ -29,10 +30,11 @@ typedef struct FFGPUResult
FFstrbuf name;
FFstrbuf driver;
double temperature;
int coreCount;
int32_t coreCount;
uint32_t frequency;
FFGPUMemory dedicated;
FFGPUMemory shared;
uint32_t vulkanDeviceId; // Only used for vulkan
uint64_t deviceId; // Used internally, may be uninitialized
} FFGPUResult;
const char* ffDetectGPU(const FFGPUOptions* options, FFlist* result);