mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-03 13:01:55 +01:00
Android: Allow custom Vulkan drivers on Mali too
Custom drivers that target Mali's kbase kernel interface exist now, and AdrenoTools can load them the same way it loads Turnip. Offer the driver manager when /dev/mali0 exists, not just /dev/kgsl-3d0, like Dolphin does (dolphin-emu/dolphin#14958). The manager is now called "Custom driver manager", and the Turnip flags are only shown on Adreno. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
840e2e3dc8
commit
60b053d7be
4 files changed
+45
-32
No files matched your search
@@ -51,30 +51,6 @@
|
||||
#include "UI/MiscViews.h"
|
||||
#include "UI/SettingsPage.h"
|
||||
|
||||
#if PPSSPP_PLATFORM(ANDROID)
|
||||
|
||||
static bool CheckKgslPresent() {
|
||||
constexpr auto KgslPath{ "/dev/kgsl-3d0" };
|
||||
|
||||
return access(KgslPath, F_OK) == 0;
|
||||
}
|
||||
|
||||
static bool SupportsCustomDriver() {
|
||||
return android_get_device_api_level() >= 28 && CheckKgslPresent();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static bool SupportsCustomDriver() {
|
||||
#ifdef _DEBUG
|
||||
return false; // change to true to debug driver installation on other platforms. DO NOT commit as true.
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static std::string PostShaderTranslateName(std::string_view value) {
|
||||
const ShaderInfo *info = GetPostShaderInfo(value);
|
||||
if (info) {
|
||||
@@ -539,7 +515,7 @@ static void BuildGraphicsPage(SettingsPage *page) {
|
||||
}
|
||||
|
||||
if (GetGPUBackend() == GPUBackend::VULKAN && SupportsCustomDriver()) {
|
||||
page->Choice({ I18NCat::GRAPHICS, "AdrenoTools driver manager" }).OpensScreen().OnClick([host](UI::EventParams &e) {
|
||||
page->Choice({ I18NCat::GRAPHICS, "Custom driver manager" }).OpensScreen().OnClick([host](UI::EventParams &e) {
|
||||
host->PageScreenManager()->push(new DriverManagerScreen(host->PageGamePath()));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user