GPU: initializes pcieSpeed everywhere

This commit is contained in:
Carter Li
2026-06-15 09:24:14 +08:00
parent c42ea6eeea
commit 43e0cc22ff
4 changed files with 4 additions and 0 deletions
+1
View File
@@ -107,6 +107,7 @@ const char* detectByOpenGL(FFlist* gpus) {
gpu->coreUsage = FF_GPU_CORE_USAGE_UNSET;
gpu->dedicated = gpu->shared = (FFGPUMemory) { 0, 0 };
gpu->deviceId = 0;
gpu->pcieSpeed = FF_GPU_PCIE_SPEED_UNSET;
FF_DEBUG("OpenGL reported renderer='%s', vendor='%s', version='%s'",
gpu->name.chars,
+1
View File
@@ -546,6 +546,7 @@ static const char* detectOf(FFlist* gpus, FFstrbuf* buffer, FFstrbuf* drmDir, co
gpu->type = FF_GPU_TYPE_INTEGRATED;
gpu->dedicated.total = gpu->dedicated.used = gpu->shared.total = gpu->shared.used = FF_GPU_VMEM_SIZE_UNSET;
gpu->frequency = FF_GPU_FREQUENCY_UNSET;
gpu->pcieSpeed = FF_GPU_PCIE_SPEED_UNSET;
pciDetectDriver(&gpu->driver, drmDir, buffer, drmKey);
+1
View File
@@ -101,6 +101,7 @@ static const char* openCLHandleData(OpenCLData* data, FFOpenCLResult* result) {
gpu->deviceId = (size_t) deviceID;
gpu->frequency = FF_GPU_FREQUENCY_UNSET;
gpu->coreUsage = FF_GPU_CORE_USAGE_UNSET;
gpu->pcieSpeed = FF_GPU_PCIE_SPEED_UNSET;
if (data->ffclGetDeviceInfo(deviceID, CL_DEVICE_VERSION, sizeof(buffer), buffer, NULL) == CL_SUCCESS) {
ffStrbufSetS(&gpu->platformApi, buffer);
+1
View File
@@ -280,6 +280,7 @@ static const char* detectVulkan(FFVulkanResult* result) {
gpu->temperature = FF_GPU_TEMP_UNSET;
gpu->frequency = FF_GPU_FREQUENCY_UNSET;
gpu->coreUsage = FF_GPU_CORE_USAGE_UNSET;
gpu->pcieSpeed = FF_GPU_PCIE_SPEED_UNSET;
next:
continue;