GPU (macOS): report core usage

This commit is contained in:
李通洲
2024-08-01 13:54:03 +08:00
parent cbf8fdf3fc
commit c549a5cab8
15 changed files with 60 additions and 19 deletions
+3 -1
View File
@@ -327,6 +327,8 @@ void ffGenerateGPUJsonResult(FFGPUOptions* options, yyjson_mut_doc* doc, yyjson_
else
yyjson_mut_obj_add_null(doc, obj, "coreCount");
yyjson_mut_obj_add_real(doc, obj, "coreUsage", gpu->coreUsage);
yyjson_mut_val* memoryObj = yyjson_mut_obj_add_obj(doc, obj, "memory");
yyjson_mut_val* dedicatedObj = yyjson_mut_obj_add_obj(doc, memoryObj, "dedicated");
@@ -371,7 +373,7 @@ void ffGenerateGPUJsonResult(FFGPUOptions* options, yyjson_mut_doc* doc, yyjson_
yyjson_mut_obj_add_strbuf(doc, obj, "platformApi", &gpu->platformApi);
yyjson_mut_obj_add_real(doc, obj, "frequency", gpu->frequency); // NaN will be output as "null"
yyjson_mut_obj_add_uint(doc, obj, "frequency", gpu->frequency);
yyjson_mut_obj_add_uint(doc, obj, "deviceId", gpu->deviceId);
}