Skip to content

Commit 36a129f

Browse files
committed
GPU: add missing variable inits
1 parent 24e94ac commit 36a129f

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/detection/gpu/gpu_apple.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const char* ffDetectGPUImpl(const FFGPUOptions* options, FFlist* gpus)
115115
if(ffCfDictGetInt(properties, CFSTR("gpu-core-count"), &gpu->coreCount)) // For Apple
116116
gpu->coreCount = FF_GPU_CORE_COUNT_UNSET;
117117

118-
gpu->coreUsage = 0.0/0.0;
118+
gpu->coreUsage = FF_GPU_CORE_USAGE_UNSET;
119119
CFDictionaryRef perfStatistics = NULL;
120120
uint64_t vramUsed = 0, vramTotal = 0;
121121
if (ffCfDictGetDict(properties, CFSTR("PerformanceStatistics"), &perfStatistics) == NULL)

src/detection/gpu/gpu_general.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist*
3636
ffStrbufInit(&gpu->platformApi);
3737
gpu->temperature = FF_GPU_TEMP_UNSET;
3838
gpu->coreCount = FF_GPU_CORE_COUNT_UNSET;
39+
gpu->coreUsage = FF_GPU_CORE_USAGE_UNSET;
3940
gpu->type = FF_GPU_TYPE_UNKNOWN;
4041
gpu->dedicated.total = gpu->dedicated.used = gpu->shared.total = gpu->shared.used = FF_GPU_VMEM_SIZE_UNSET;
4142
gpu->deviceId = ((uint64_t) dev->domain << 6) | ((uint64_t) dev->bus << 4) | ((uint64_t) dev->dev << 2) | (uint64_t) dev->func;

src/detection/gpu/gpu_haiku.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist*
2626
ffStrbufInit(&gpu->platformApi);
2727
gpu->temperature = FF_GPU_TEMP_UNSET;
2828
gpu->coreCount = FF_GPU_CORE_COUNT_UNSET;
29+
gpu->coreUsage = FF_GPU_CORE_USAGE_UNSET;
2930
gpu->type = FF_GPU_TYPE_UNKNOWN;
3031
gpu->dedicated.total = gpu->dedicated.used = gpu->shared.total = gpu->shared.used = FF_GPU_VMEM_SIZE_UNSET;
3132
gpu->deviceId = ((uint64_t) dev.bus << 4) | ((uint64_t) dev.device << 2) | (uint64_t) dev.function;
@@ -40,4 +41,3 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist*
4041

4142
return NULL;
4243
}
43-

0 commit comments

Comments
 (0)