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

Vulkan: Allow custom drivers on Mali devices
This commit is contained in:
JosJuice
2026-10-31 16:39:44 +01:00
committed by GitHub
2 changed files with 10 additions and 2 deletions

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();
}

View File

@@ -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