mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
Merge remote-tracking branch 'droiddeck/main' into feat/malibridge
# Conflicts: # README.md # app/src/main/java/com/droiddeck/launcher/gpu/TurnipDriver.java # app/src/main/java/com/droiddeck/launcher/runtime/BwrapSpawner.kt # app/src/main/res/values-ar/strings.xml # app/src/main/res/values-b+es+419/strings.xml # app/src/main/res/values-bg/strings.xml # app/src/main/res/values-cs/strings.xml # app/src/main/res/values-da/strings.xml # app/src/main/res/values-de/strings.xml # app/src/main/res/values-el/strings.xml # app/src/main/res/values-es/strings.xml # app/src/main/res/values-fi/strings.xml # app/src/main/res/values-fr/strings.xml # app/src/main/res/values-hi/strings.xml # app/src/main/res/values-hu/strings.xml # app/src/main/res/values-in/strings.xml # app/src/main/res/values-it/strings.xml # app/src/main/res/values-ja/strings.xml # app/src/main/res/values-ko/strings.xml # app/src/main/res/values-ms/strings.xml # app/src/main/res/values-nb/strings.xml # app/src/main/res/values-nl/strings.xml # app/src/main/res/values-pl/strings.xml # app/src/main/res/values-pt-rPT/strings.xml # app/src/main/res/values-pt/strings.xml # app/src/main/res/values-ro/strings.xml # app/src/main/res/values-ru/strings.xml # app/src/main/res/values-sv/strings.xml # app/src/main/res/values-th/strings.xml # app/src/main/res/values-tr/strings.xml # app/src/main/res/values-uk/strings.xml # app/src/main/res/values-vi/strings.xml # app/src/main/res/values-zh-rCN/strings.xml # app/src/main/res/values-zh-rHK/strings.xml # app/src/main/res/values-zh-rTW/strings.xml # app/src/main/res/values/strings.xml # tools/linuxfs/overlay/usr/local/bin/droiddeck-game-env
This commit is contained in:
commit
0a5955d6fa
731 files changed
+54131
-2491
No files matched your search
@@ -16,6 +16,7 @@ data class GpuInfo(
|
||||
val modelSource: String = "",
|
||||
val kgslChipId: String = "",
|
||||
val platformGpuModel: Int = 0,
|
||||
val verifiedDevice: Boolean = false,
|
||||
) {
|
||||
enum class Family(val label: String) {
|
||||
A8XX("Adreno 8xx"),
|
||||
@@ -36,6 +37,7 @@ data class GpuInfo(
|
||||
get() = when {
|
||||
family == Family.NOT_ADRENO -> Support.UNSUPPORTED
|
||||
isA850 -> Support.UNTESTED
|
||||
verifiedDevice -> Support.TESTED
|
||||
family == Family.A6XX && model == 650 -> Support.TESTED
|
||||
family == Family.A8XX -> Support.TESTED
|
||||
family == Family.A7XX && model >= 725 -> Support.TESTED
|
||||
@@ -85,9 +87,13 @@ data class GpuInfo(
|
||||
oneUi8Gen2 = samsung && model == 740,
|
||||
kgslName = raw.orEmpty(), modelSource = source, kgslChipId = chipId,
|
||||
platformGpuModel = platformGpuModel,
|
||||
verifiedDevice = adreno && verifiedOn(model, Build.MODEL),
|
||||
)
|
||||
}
|
||||
|
||||
internal fun verifiedOn(model: Int, device: String): Boolean =
|
||||
model == 722 && device.equals("Retroid Pocket Duo", ignoreCase = true)
|
||||
|
||||
internal fun threeDigits(text: String): Int = Regex("""(?i)\badreno\s*(?:\(TM\)\s*)?(\d{3})(?!\d)""").find(text)?.groupValues?.get(1)?.toIntOrNull() ?: 0
|
||||
|
||||
internal fun modelFromNames(
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
@@ -47,10 +48,16 @@ public final class TurnipDriver {
|
||||
|
||||
private final Context context;
|
||||
private final File contentDir;
|
||||
private final Supplier<GpuInfo> gpuDetector;
|
||||
|
||||
public TurnipDriver(Context context) {
|
||||
this(context, GpuInfo.Companion::detect);
|
||||
}
|
||||
|
||||
TurnipDriver(Context context, Supplier<GpuInfo> gpuDetector) {
|
||||
this.context = context;
|
||||
this.contentDir = new File(context.getFilesDir(), "graphics_driver");
|
||||
this.gpuDetector = gpuDetector;
|
||||
}
|
||||
|
||||
public String driverPath(String driverId) {
|
||||
@@ -288,7 +295,12 @@ public final class TurnipDriver {
|
||||
Log.i(TAG, "Mali bridge: the compositor uses the system Vulkan driver");
|
||||
return null;
|
||||
}
|
||||
int model = GpuInfo.Companion.detect().getModel();
|
||||
GpuInfo gpu = gpuDetector.get();
|
||||
if (gpu.getFamily() == GpuInfo.Family.NOT_ADRENO) {
|
||||
Log.i(TAG, "not an Adreno GPU; leaving the display driver to the system");
|
||||
return null;
|
||||
}
|
||||
int model = gpu.getModel();
|
||||
Log.i(TAG, "gpu model: " + (model == 0 ? "unknown" : model));
|
||||
return chooseByModel(model, android.os.Build.VERSION.SDK_INT);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user