Skip to content

Commit ddce9b2

Browse files
committed
GPU: rename ffGetGPUVendorString to ffGPUGetVendorString
1 parent 9342d74 commit ddce9b2

File tree

11 files changed

+13
-13
lines changed

11 files changed

+13
-13
lines changed

src/detection/gpu/gpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const char* FF_GPU_VENDOR_NAME_MICROSOFT = "Microsoft";
1616
const char* FF_GPU_VENDOR_NAME_REDHAT = "RedHat";
1717
const char* FF_GPU_VENDOR_NAME_ORACLE = "Oracle";
1818

19-
const char* ffGetGPUVendorString(unsigned vendorId)
19+
const char* ffGPUGetVendorString(unsigned vendorId)
2020
{
2121
// https://devicehunt.com/all-pci-vendors
2222
switch (vendorId)

src/detection/gpu/gpu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ typedef struct FFGPUResult
4646
const char* ffDetectGPU(const FFGPUOptions* options, FFlist* result);
4747
const char* ffDetectGPUImpl(const FFGPUOptions* options, FFlist* gpus);
4848

49-
const char* ffGetGPUVendorString(unsigned vendorId);
49+
const char* ffGPUGetVendorString(unsigned vendorId);
5050
const char* ffGPUDetectByEglext(FFlist* gpus);
5151

5252
#if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__NetBSD__) || defined(__OpenBSD__)

src/detection/gpu/gpu_apple.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const char* ffDetectGPUImpl(const FFGPUOptions* options, FFlist* gpus)
161161
int vendorId;
162162
if(ffCfDictGetInt(properties, CFSTR("vendor-id"), &vendorId) == NULL)
163163
{
164-
const char* vendorStr = ffGetGPUVendorString((unsigned) vendorId);
164+
const char* vendorStr = ffGPUGetVendorString((unsigned) vendorId);
165165
ffStrbufAppendS(&gpu->vendor, vendorStr);
166166
if (vendorStr == FF_GPU_VENDOR_NAME_APPLE || vendorStr == FF_GPU_VENDOR_NAME_INTEL)
167167
gpu->type = FF_GPU_TYPE_INTEGRATED;

src/detection/gpu/gpu_bsd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const char* ffDetectGPUImpl(const FFGPUOptions* options, FFlist* gpus)
3838
struct pci_conf* pc = &confs[i];
3939

4040
FFGPUResult* gpu = (FFGPUResult*)ffListAdd(gpus);
41-
ffStrbufInitStatic(&gpu->vendor, ffGetGPUVendorString(pc->pc_vendor));
41+
ffStrbufInitStatic(&gpu->vendor, ffGPUGetVendorString(pc->pc_vendor));
4242
ffStrbufInit(&gpu->name);
4343
ffStrbufInitS(&gpu->driver, pc->pd_name);
4444
ffStrbufInit(&gpu->platformApi);

src/detection/gpu/gpu_general.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist*
1515
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(pciaccess, pci_slot_match_iterator_create)
1616
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(pciaccess, pci_device_next)
1717
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(pciaccess, pci_system_cleanup)
18-
18+
1919
{
2020
// Requires root access
2121
// Same behavior can be observed with `cp $(which scanpci) /tmp/ && /tmp/scanpci`
@@ -31,7 +31,7 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist*
3131
continue;
3232

3333
FFGPUResult* gpu = (FFGPUResult*)ffListAdd(gpus);
34-
ffStrbufInitStatic(&gpu->vendor, ffGetGPUVendorString(dev->vendor_id));
34+
ffStrbufInitStatic(&gpu->vendor, ffGPUGetVendorString(dev->vendor_id));
3535
ffStrbufInit(&gpu->name);
3636
ffStrbufInit(&gpu->driver);
3737
ffStrbufInit(&gpu->platformApi);

src/detection/gpu/gpu_linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ static const char* detectPci(const FFGPUOptions* options, FFlist* gpus, FFstrbuf
435435
return "Invalid PCI device path";
436436

437437
FFGPUResult* gpu = (FFGPUResult*)ffListAdd(gpus);
438-
ffStrbufInitStatic(&gpu->vendor, ffGetGPUVendorString((uint16_t) vendorId));
438+
ffStrbufInitStatic(&gpu->vendor, ffGPUGetVendorString((uint16_t) vendorId));
439439
ffStrbufInit(&gpu->name);
440440
ffStrbufInit(&gpu->driver);
441441
ffStrbufInit(&gpu->platformApi);

src/detection/gpu/gpu_sunos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist*
5151
uint32_t revision = (uint32_t) strtoul(pclass, NULL, 16);
5252

5353
FFGPUResult* gpu = (FFGPUResult*)ffListAdd(gpus);
54-
ffStrbufInitStatic(&gpu->vendor, ffGetGPUVendorString(vendorId));
54+
ffStrbufInitStatic(&gpu->vendor, ffGPUGetVendorString(vendorId));
5555
ffStrbufInit(&gpu->name);
5656
ffStrbufInit(&gpu->driver);
5757
ffStrbufInit(&gpu->platformApi);

src/detection/gpu/gpu_windows.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist*
7272
{
7373
uint32_t vendorId = 0;
7474
if(ffRegReadUint(hDirectxKey, L"VendorId", &vendorId, NULL) && vendorId)
75-
ffStrbufSetStatic(&gpu->vendor, ffGetGPUVendorString(vendorId));
75+
ffStrbufSetStatic(&gpu->vendor, ffGPUGetVendorString(vendorId));
7676

7777
if (gpu->vendor.chars == FF_GPU_VENDOR_NAME_INTEL)
7878
gpu->type = gpu->deviceId == 20 ? FF_GPU_TYPE_INTEGRATED : FF_GPU_TYPE_DISCRETE;
@@ -147,7 +147,7 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist*
147147
if (SetupDiGetDeviceRegistryPropertyW(hdev, &did, SPDRP_HARDWAREID, NULL, (PBYTE) buffer, sizeof(buffer), NULL))
148148
{
149149
swscanf(buffer, L"PCI\\VEN_%x&DEV_%x&SUBSYS_%x&REV_%x", &vendorId, &deviceId, &subSystemId, &revId);
150-
ffStrbufSetStatic(&gpu->vendor, ffGetGPUVendorString(vendorId));
150+
ffStrbufSetStatic(&gpu->vendor, ffGPUGetVendorString(vendorId));
151151
}
152152

153153
detectFn(

src/detection/gpu/gpu_wsl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const char* ffGPUDetectByDirectX(FF_MAYBE_UNUSED const FFGPUOptions* options, FF
104104
DXCoreHardwareID hardwareId;
105105
if (SUCCEEDED(adapter->GetProperty(DXCoreAdapterProperty::HardwareID, sizeof(hardwareId), &hardwareId)))
106106
{
107-
const char* vendorStr = ffGetGPUVendorString((unsigned) hardwareId.vendorID);
107+
const char* vendorStr = ffGPUGetVendorString((unsigned) hardwareId.vendorID);
108108
ffStrbufSetStatic(&gpu->vendor, vendorStr);
109109

110110
if (vendorStr == FF_GPU_VENDOR_NAME_NVIDIA && (options->driverSpecific || options->temp))

src/detection/opencl/opencl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static const char* openCLHandleData(OpenCLData* data, FFOpenCLResult* result)
112112
{
113113
cl_uint vendorId;
114114
if (data->ffclGetDeviceInfo(deviceID, CL_DEVICE_VENDOR_ID, sizeof(vendorId), &vendorId, NULL) == CL_SUCCESS)
115-
ffStrbufSetStatic(&gpu->vendor, ffGetGPUVendorString(vendorId));
115+
ffStrbufSetStatic(&gpu->vendor, ffGPUGetVendorString(vendorId));
116116
if (gpu->vendor.length == 0 && data->ffclGetDeviceInfo(deviceID, CL_DEVICE_VENDOR, sizeof(buffer), buffer, NULL) == CL_SUCCESS)
117117
ffStrbufSetS(&gpu->vendor, buffer);
118118
}

0 commit comments

Comments
 (0)