@@ -72,26 +72,13 @@ func get_gpu_info() -> GPUInfo:
72
72
# for the currently active GPU. Vulkaninfo can provide data
73
73
# on all detected GPU devices.
74
74
gpu_info .vendor = RenderingServer .get_video_adapter_vendor ()
75
- match gpu_info .vendor :
76
- "AMD" , "AuthenticAMD" , 'AuthenticAMD Advanced Micro Devices, Inc.' , "Advanced Micro Devices, Inc. [AMD/ATI]" :
77
- gpu_info .vendor = "AMD"
78
- "Intel" , "GenuineIntel" , "Intel Corporation" :
79
- gpu_info .vendor = "Intel"
80
- "Nvidia" :
81
- gpu_info .vendor = "Trash" # :D
82
- logger .info ("Nvidia devices are not suppored." )
83
- return null
84
- _ :
85
- logger .warn ("Device vendor string not recognized:" , RenderingServer .get_video_adapter_vendor ())
86
- return null
87
-
88
75
gpu_info .model = RenderingServer .get_video_adapter_name ()
89
76
gpu_info .driver = RenderingServer .get_video_adapter_api_version ()
90
77
91
78
# Identify all installed GPU's
92
79
if cards .size () <= 0 :
93
- logger .error ("GPU Data could not be derived." )
94
- return null
80
+ logger .error ("GPU Card subdata could not be derived." )
81
+ return gpu_info
95
82
96
83
var active_gpu_data := get_active_gpu_device ()
97
84
if active_gpu_data .size () == 0 :
@@ -192,11 +179,13 @@ func get_gpu_card(card_dir: String) -> DRMCardInfo:
192
179
193
180
if line .begins_with ("\t " ) and not vendor_found :
194
181
continue
182
+
195
183
if line .begins_with (vendor_id ):
196
184
vendor = line .lstrip (vendor_id ).strip_edges ()
197
185
logger .debug ("Found vendor name:" , vendor )
198
186
vendor_found = true
199
187
continue
188
+
200
189
if vendor_found and not line .begins_with ("\t " ):
201
190
if line .begins_with ("#" ):
202
191
continue
@@ -221,31 +210,17 @@ func get_gpu_card(card_dir: String) -> DRMCardInfo:
221
210
logger .debug ("Found subdevice name:" , subdevice )
222
211
break
223
212
224
- # Sanitize the vendor strings so they are standard.
225
- match vendor :
226
- "AMD" , "AuthenticAMD" , 'AuthenticAMD Advanced Micro Devices, Inc.' , "Advanced Micro Devices, Inc. [AMD/ATI]" :
227
- vendor = "AMD"
228
- "Intel" , "GenuineIntel" , "Intel Corporation" :
229
- vendor = "Intel"
230
- "Nvidia" :
231
- vendor = "Trash"
232
- logger .warn ("Nvidia devices are not suppored." )
233
- # TODO: Handle this case
234
- return null
235
- _ :
236
- logger .warn ("Device vendor string not recognized:" , vendor )
237
- # TODO: Handle this case
238
- return null
239
-
240
213
# Create a new card instance and take over the caching path
241
214
var card_info : DRMCardInfo
242
215
match vendor :
243
- "AMD" :
216
+ "AMD" , "AuthenticAMD" , 'AuthenticAMD Advanced Micro Devices, Inc.' , "Advanced Micro Devices, Inc. [AMD/ATI]" :
244
217
card_info = DRMCardInfoAMD .new (card_dir )
245
- "Intel" :
218
+ "Intel" , "GenuineIntel" , "Intel Corporation" :
246
219
card_info = DRMCardInfoIntel .new (card_dir )
247
220
_ :
248
- return null
221
+ logger .info ("Device vendor string is not fully supported:" , vendor , ". Using generic implementation." )
222
+ card_info = DRMCardInfo .new (card_dir )
223
+
249
224
card_info .take_over_path (res_path )
250
225
card_info .vendor = vendor
251
226
card_info .vendor_id = vendor_id
0 commit comments