@@ -317,16 +317,21 @@ static PFN_vkVoidFunction LoadDeviceFuncCore(VkDevice device, const char *name,
317
317
static const char * const g_deviceNameBlacklist[] = {
318
318
" NVIDIA:SHIELD Tablet K1" ,
319
319
" SDL:Horizon" ,
320
- " motorola:moto g54 5G" , // See issue #18681 / #17825
321
320
};
322
321
323
- static constexpr std::string_view g_gpuNameBlacklist[] = {
324
- " DuMmY" , // avoid an empty array
322
+ struct DriverBlackListEntry {
323
+ std::string_view deviceNamePrefix;
324
+ std::string_view gpuDeviceName;
325
+ uint32_t minOkDriverVersion;
326
+ };
327
+
328
+ static constexpr DriverBlackListEntry g_gpuNameBlacklist[] = {
329
+ {" motorola:moto g" , " PowerVR BXM-8-256" , 0x005d9576 }, // avoid an empty array
325
330
#if PPSSPP_PLATFORM(MAC)
326
- " Intel(R) Iris(TM) Graphics 6000" ,
327
- " Intel(R) Iris(TM) Graphics 6100" ,
328
- " Intel(R) Iris(TM) Pro Graphics 6200" ,
329
- " Intel Iris Pro Graphics" ,
331
+ { " " , " Intel(R) Iris(TM) Graphics 6000" } ,
332
+ { " " , " Intel(R) Iris(TM) Graphics 6100" } ,
333
+ { " " , " Intel(R) Iris(TM) Pro Graphics 6200" } ,
334
+ { " " , " Intel Iris Pro Graphics" } ,
330
335
#endif
331
336
};
332
337
@@ -444,17 +449,17 @@ bool VulkanMayBeAvailable() {
444
449
}
445
450
446
451
// Note: Here it's device name as in the entire physical device, not GPU device.
447
- const std::string name = System_GetProperty (SYSPROP_NAME);
452
+ const std::string hwDeviceName = System_GetProperty (SYSPROP_NAME);
448
453
for (std::string_view blacklisted_name : g_deviceNameBlacklist) {
449
- if (equals (name , blacklisted_name)) {
450
- INFO_LOG (Log::G3D, " VulkanMayBeAvailable: Device blacklisted ('%s')" , name .c_str ());
454
+ if (equals (hwDeviceName , blacklisted_name)) {
455
+ INFO_LOG (Log::G3D, " VulkanMayBeAvailable: Device blacklisted ('%s')" , hwDeviceName .c_str ());
451
456
g_vulkanAvailabilityChecked = true ;
452
457
g_vulkanMayBeAvailable = false ;
453
458
return false ;
454
459
}
455
460
}
456
461
457
- INFO_LOG (Log::G3D, " VulkanMayBeAvailable: Device allowed ('%s')" , name .c_str ());
462
+ INFO_LOG (Log::G3D, " VulkanMayBeAvailable: Device allowed ('%s')" , hwDeviceName .c_str ());
458
463
459
464
std::string errorStr;
460
465
VulkanLibraryHandle lib = VulkanLoadLibrary (&errorStr);
@@ -595,8 +600,16 @@ bool VulkanMayBeAvailable() {
595
600
// Check with the device blacklist.
596
601
bool blacklisted = false ;
597
602
for (size_t i = 0 ; i < ARRAY_SIZE (g_gpuNameBlacklist); i++) {
598
- if (equals (props.deviceName , g_gpuNameBlacklist[i])) {
599
- blacklisted = true ;
603
+ if (startsWith (hwDeviceName, g_gpuNameBlacklist[i].deviceNamePrefix )) {
604
+ if (equals (props.deviceName , g_gpuNameBlacklist[i].gpuDeviceName )) {
605
+ if (g_gpuNameBlacklist[i].minOkDriverVersion != 0 ) {
606
+ if (props.driverVersion < g_gpuNameBlacklist[i].minOkDriverVersion ) {
607
+ blacklisted = true ;
608
+ }
609
+ } else {
610
+ blacklisted = true ;
611
+ }
612
+ }
600
613
}
601
614
}
602
615
anyGood = !blacklisted;
0 commit comments