From 83dcdaa726332eb114be0dae7eaa98ef497c9fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Tue, 23 Jul 2024 09:50:51 +0800 Subject: [PATCH] GPU: fix frequency printing when using custom formation --- src/modules/gpu/gpu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/gpu/gpu.c b/src/modules/gpu/gpu.c index 22cef578c..a653b34ac 100644 --- a/src/modules/gpu/gpu.c +++ b/src/modules/gpu/gpu.c @@ -87,6 +87,9 @@ static void printGPUResult(FFGPUOptions* options, uint8_t index, const FFGPUResu if (gpu->shared.total != FF_GPU_VMEM_SIZE_UNSET) ffParseSize(gpu->shared.total, &sTotal); if (gpu->shared.used != FF_GPU_VMEM_SIZE_UNSET) ffParseSize(gpu->shared.used, &sUsed); + FF_STRBUF_AUTO_DESTROY frequency = ffStrbufCreate(); + ffParseFrequency(gpu->frequency, &frequency); + FF_PRINT_FORMAT_CHECKED(FF_GPU_MODULE_NAME, index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, FF_GPU_NUM_FORMAT_ARGS, ((FFformatarg[]) { {FF_FORMAT_ARG_TYPE_STRBUF, &gpu->vendor, "vendor"}, {FF_FORMAT_ARG_TYPE_STRBUF, &gpu->name, "name"}, @@ -99,7 +102,7 @@ static void printGPUResult(FFGPUOptions* options, uint8_t index, const FFGPUResu {FF_FORMAT_ARG_TYPE_STRBUF, &sTotal, "shared-total"}, {FF_FORMAT_ARG_TYPE_STRBUF, &sUsed, "shared-used"}, {FF_FORMAT_ARG_TYPE_STRBUF, &gpu->platformApi, "platform-api"}, - {FF_FORMAT_ARG_TYPE_DOUBLE, &gpu->frequency, "frequency"}, + {FF_FORMAT_ARG_TYPE_STRBUF, &frequency, "frequency"}, })); } }