aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp
blob: 2d146a4bedefca01dc5e1283d85e22076d1a1073 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp.orig	2021-03-13 00:03:31 UTC
+++ third_party/angle/src/gpu_info_util/SystemInfo_linux.cpp
@@ -71,10 +71,18 @@ bool GetPCIDevicesWithLibPCI(std::vector<GPUDeviceInfo
 
 bool GetSystemInfo(SystemInfo *info)
 {
+#if defined(__FreeBSD__)
+    if (!CollectMesaCardInfo(&(info->gpus)))
+    {
+        if (!GetPCIDevicesFreeBSD(&(info->gpus)))
+            return false;
+    }
+#else
     if (!GetPCIDevicesWithLibPCI(&(info->gpus)))
     {
         return false;
     }
+#endif
 
     if (info->gpus.size() == 0)
     {