Vulkan: Allow custom drivers on Mali devices

This commit is contained in:
Brian Degenhardt committed 2026-10-28 15:53:55 -07:00
1 parent 3eb30c7620
commit a8fc326a6b
2 files changed
+10 -2

No files matched your search

+2 -1
View File
@@ -96,7 +96,8 @@ JNIEXPORT jboolean JNICALL
Java_org_dolphinemu_dolphinemu_utils_GpuDriverHelper_00024Companion_supportsCustomDriverLoading(
JNIEnv* env, jobject instance)
{
// If the KGSL device exists custom drivers can be loaded using adrenotools
// If the KGSL (Adreno) or kbase (Mali) device exists custom drivers can be loaded using
// adrenotools
return Vulkan::SupportsCustomDriver();
}
@@ -254,9 +254,16 @@ static bool CheckKgslPresent()
return access(KgslPath, F_OK) == 0;
}
static bool CheckKbasePresent()
{
constexpr auto KbasePath{"/dev/mali0"};
return access(KbasePath, F_OK) == 0;
}
bool SupportsCustomDriver()
{
return android_get_device_api_level() >= 28 && CheckKgslPresent();
return android_get_device_api_level() >= 28 && (CheckKgslPresent() || CheckKbasePresent());
}
#endif