2022-09-05 17:42:42 +02:00
|
|
|
#include "gpu.h"
|
|
|
|
|
#include "detection/internal.h"
|
2022-09-09 20:43:24 +02:00
|
|
|
#include "detection/vulkan.h"
|
2022-09-05 17:42:42 +02:00
|
|
|
|
|
|
|
|
void ffDetectGPUImpl(FFlist* gpus, const FFinstance* instance);
|
|
|
|
|
|
|
|
|
|
const FFlist* ffDetectGPU(const FFinstance* instance)
|
|
|
|
|
{
|
|
|
|
|
FF_DETECTION_INTERNAL_GUARD(FFlist,
|
|
|
|
|
ffListInit(&result, sizeof(FFGPUResult));
|
|
|
|
|
ffDetectGPUImpl(&result, instance);
|
2022-09-09 20:43:24 +02:00
|
|
|
|
|
|
|
|
if(result.length == 0)
|
|
|
|
|
{
|
|
|
|
|
const FFVulkanResult* vulkan = ffDetectVulkan(instance);
|
|
|
|
|
result = vulkan->gpus;
|
|
|
|
|
}
|
2022-09-05 17:42:42 +02:00
|
|
|
);
|
|
|
|
|
}
|