mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-11-18 09:46:19 -06:00
Merge pull request #14958 from bmdhacks/mali-custom-driver
Vulkan: Allow custom drivers on Mali devices
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user