Merge pull request #14958 from bmdhacks/mali-custom-driver

Vulkan: Allow custom drivers on Mali devices
This commit is contained in:
JosJuice authored and GitHub committed 2026-10-31 16:39:44 +01:00
commit 613db73aeb
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