mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-11 02:51:10 +00:00
Merge MaliBridge integration (feat/malibridge) into 0.6.7
This commit is contained in:
commit
d4a6d95127
72 files changed
+1972
-52
No files matched your search
@@ -165,6 +165,8 @@ jobs:
|
||||
run: test "$(git rev-parse 'HEAD^{tree}')" = "$SOURCE_TREE"
|
||||
- name: Resolve the pinned Android NDK
|
||||
run: bash tools/ci/resolve-ndk.sh
|
||||
- name: Check out MaliBridge
|
||||
run: git submodule update --init external/MaliBridge
|
||||
|
||||
- name: Plan component identities
|
||||
id: plan
|
||||
@@ -228,6 +230,7 @@ jobs:
|
||||
${{ steps.preloads.outputs.cache-hit != 'true' && 'runtime' || '' }}
|
||||
${{ steps.component-preloads.outputs.arm64 != 'true' && 'arm64-preloads' || '' }}
|
||||
${{ steps.comet.outputs.cache-hit != 'true' && 'comet' || '' }}
|
||||
vkbridge
|
||||
run: python3 tools/components/prepare.py tools
|
||||
|
||||
- name: Build changed ARM64 preloads
|
||||
@@ -238,6 +241,9 @@ jobs:
|
||||
if: steps.preloads.outputs.cache-hit != 'true'
|
||||
run: python3 tools/components/prepare.py runtime
|
||||
|
||||
- name: Build the Mali bridge's Linux side
|
||||
run: python3 tools/components/prepare.py vkbridge
|
||||
|
||||
- name: Fetch the Debian image the preloads build in
|
||||
if: steps.component-preloads.outputs.x86 != 'true'
|
||||
env:
|
||||
@@ -269,6 +275,12 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
bash tools/linuxfs/check-preloads.sh app/src/main/assets/linuxfs
|
||||
D=app/src/main/assets/linuxfs
|
||||
VKB="$D/usr/local/lib/vkbridge/libvulkan_droidbridge.so"
|
||||
test -f "$VKB" && test -f "$D/usr/local/share/vkbridge/droidbridge_icd.json" && test -f "$D/usr/local/bin/droiddeck-vkbridge-smoke"
|
||||
VKB_NEED=$(readelf -d "$VKB" | sed -n 's/.*NEEDED.*\[\(.*\)\]/\1/p' | grep -vx 'libc.so.6' | grep -vx 'ld-linux-aarch64.so.1' || true)
|
||||
[ -z "$VKB_NEED" ] || { echo "::error::the bridge ICD needs $VKB_NEED"; exit 1; }
|
||||
[ "$(readelf -Ws "$VKB" | awk '$4 == "FUNC" && $5 == "GLOBAL" && $7 != "UND" {sub(/@.*/, "", $8); print $8}' | grep -c '^vk_icd')" = 3 ] || { echo "::error::the bridge ICD does not export the loader interface"; exit 1; }
|
||||
|
||||
- name: Build GOG Galaxy companion
|
||||
if: steps.comet.outputs.cache-hit != 'true'
|
||||
@@ -526,6 +538,9 @@ jobs:
|
||||
echo "::warning::built proot pack $sha does not match tools/packs/proot/release.env ($PROOT_PACK_SHA256). This build publishes the pack it just built. Source builds keep downloading the pinned pack until release.env is updated."
|
||||
fi
|
||||
|
||||
- name: Check out MaliBridge
|
||||
run: git submodule update --init external/MaliBridge
|
||||
|
||||
- name: Build
|
||||
id: build
|
||||
env:
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
[submodule "external/MaliBridge"]
|
||||
path = external/MaliBridge
|
||||
url = https://github.com/ASEbrahim/MaliBridge.git
|
||||
@@ -65,6 +65,13 @@ Compatibility and performance vary by device. Desktop compositing is software re
|
||||
|
||||
DroidDeck is [GPL-3.0](LICENSE). Steam and Proton belong to Valve Corporation. VITURE, RayNeo, XREAL, Rokid, REDMAGIC, Nintendo Switch and Joy-Con are trademarks of their owners. This project is not affiliated with any of them.
|
||||
|
||||
<details>
|
||||
<summary><b>Mali GPUs</b></summary>
|
||||
|
||||
- GPUs other than Adreno draw through [MaliBridge by ASEbrahim](https://github.com/ASEbrahim/MaliBridge) (GPL-3.0-or-later, with the attribution terms in its NOTICE), built from the `external/MaliBridge` submodule. Its DroidDeck integration is [@ASEbrahim](https://github.com/ASEbrahim)'s work from their [DroidDeck fork](https://github.com/ASEbrahim/DroidDeck); it credits Vulkan-Headers, Arm's HWCPipe, bcdec, Lee Gao's etc2_encode and Mali research, David Cimo, The412Banner and others. See [docs/third-party/malibridge](docs/third-party/malibridge/README.md).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Runtime, Wine and Proton</b></summary>
|
||||
|
||||
|
||||
@@ -341,6 +341,21 @@ def buildRustStores = tasks.register('buildRustStores', Exec) {
|
||||
if (!skipRust) android.sourceSets.main.jniLibs.srcDir(rustJniLibsDir)
|
||||
tasks.named('preBuild').configure { dependsOn(buildRustStores) }
|
||||
|
||||
def maliBridgeDir = rootProject.file('external/MaliBridge')
|
||||
def vkbridgeJniLibsDir = layout.buildDirectory.dir('vkbridgeJniLibs')
|
||||
def buildVkBridgeServer = tasks.register('buildVkBridgeServer', Exec) {
|
||||
description = 'Builds the Vulkan bridge server (libvkbridge_server.so) with the NDK.'
|
||||
inputs.dir(new File(maliBridgeDir, 'common'))
|
||||
inputs.dir(new File(maliBridgeDir, 'server'))
|
||||
inputs.dir(new File(maliBridgeDir, 'third_party'))
|
||||
inputs.file(new File(maliBridgeDir, 'scripts/build-server-android.sh'))
|
||||
outputs.dir(vkbridgeJniLibsDir)
|
||||
commandLine 'bash', new File(maliBridgeDir, 'scripts/build-server-android.sh').absolutePath,
|
||||
android.ndkDirectory.absolutePath, vkbridgeJniLibsDir.get().asFile.absolutePath
|
||||
}
|
||||
android.sourceSets.main.jniLibs.srcDir(vkbridgeJniLibsDir)
|
||||
tasks.named('preBuild').configure { dependsOn(buildVkBridgeServer) }
|
||||
|
||||
dependencies {
|
||||
implementation "org.opencv:opencv:${trackingPack.OPENCV_VERSION}"
|
||||
implementation 'org.khronos.openxr:openxr_loader_for_android:1.1.49'
|
||||
|
||||
@@ -62,6 +62,7 @@ Java_com_droiddeck_launcher_gpu_VulkanInfo_nativeQuery(JNIEnv *env, jclass clazz
|
||||
LINE("driver_version=%u.%u.%u\n", p.driverVersion >> 22, (p.driverVersion >> 12) & 0x3ff, p.driverVersion & 0xfff);
|
||||
LINE("vendor_id=0x%04x\ndevice_id=0x%08x\n", p.vendorID, p.deviceID);
|
||||
LINE("max_image_2d=%u\n", p.limits.maxImageDimension2D);
|
||||
LINE("max_push_constants=%u\n", p.limits.maxPushConstantsSize);
|
||||
|
||||
uint32_t extCount = 0;
|
||||
if (vkEnumerateDeviceExtensionProperties) vkEnumerateDeviceExtensionProperties(device, NULL, &extCount, NULL);
|
||||
@@ -91,6 +92,7 @@ Java_com_droiddeck_launcher_gpu_VulkanInfo_nativeQuery(JNIEnv *env, jclass clazz
|
||||
vkGetPhysicalDeviceFeatures(device, &f);
|
||||
LINE("geometry_shader=%s\ntessellation_shader=%s\ntexture_bc=%s\n",
|
||||
f.geometryShader ? "yes" : "no", f.tessellationShader ? "yes" : "no", f.textureCompressionBC ? "yes" : "no");
|
||||
LINE("shader_int64=%s\n", f.shaderInt64 ? "yes" : "no");
|
||||
}
|
||||
if (vkGetPhysicalDeviceMemoryProperties) {
|
||||
VkPhysicalDeviceMemoryProperties m;
|
||||
|
||||
@@ -381,6 +381,26 @@ static int sniff_modifier(const struct droiddeck_native_handle *h, uint64_t *mod
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define SC_MOD_GRALLOC (~0ULL - 1)
|
||||
|
||||
static const char *pool_kind(uint64_t mod) {
|
||||
return mod == MOD_QCOM_COMPRESSED ? "UBWC" : mod == SC_MOD_GRALLOC ? "gralloc-laid-out" : "linear";
|
||||
}
|
||||
|
||||
static void describe_handle(const struct droiddeck_native_handle *h, char *out, size_t n) {
|
||||
size_t o = 0;
|
||||
out[0] = 0;
|
||||
if (!h) { snprintf(out, n, "no handle"); return; }
|
||||
for (int i = 0; i < h->numFds && i < 4 && o < n; i++) {
|
||||
off_t sz = lseek(h->data[i], 0, SEEK_END);
|
||||
if (sz >= 0) lseek(h->data[i], 0, SEEK_SET);
|
||||
o += (size_t)snprintf(out + o, n - o, "%sfd%d %lld bytes", i ? ", " : "", i, (long long)sz);
|
||||
}
|
||||
if (o < n) o += (size_t)snprintf(out + o, n - o, "; ints");
|
||||
for (int i = 0; i < h->numInts && i < 8 && o < n; i++)
|
||||
o += (size_t)snprintf(out + o, n - o, " %#x", (unsigned)h->data[h->numFds + i]);
|
||||
}
|
||||
|
||||
static int g_alloc_failed;
|
||||
|
||||
enum { TIER_UBWC, TIER_PLAIN, TIER_LINEAR };
|
||||
@@ -416,22 +436,54 @@ static int alloc_slot(struct layer *l, struct slot *s, int w, int h, uint32_t fm
|
||||
AHardwareBuffer_Desc got; AHardwareBuffer_describe(ahb, &got);
|
||||
const struct droiddeck_native_handle *nh = api.getNativeHandle(ahb);
|
||||
uint64_t mod = MOD_LINEAR;
|
||||
if (!sniff_modifier(nh, &mod)) {
|
||||
if (tier < TIER_LINEAR) {
|
||||
struct vkp_image *img = NULL;
|
||||
const char *path;
|
||||
char info[160] = "";
|
||||
if (sniff_modifier(nh, &mod)) {
|
||||
img = vkp_image_import_dmabuf(nh->data[0], fmt == AHB_RGB10A2 ? DRM_ABGR2101010 : DRM_ABGR8888, mod, w, h,
|
||||
got.stride * 4, 0, 1);
|
||||
path = "dma-buf (QTI handle)";
|
||||
} else {
|
||||
if (tier == TIER_UBWC) {
|
||||
char hd[256];
|
||||
describe_handle(nh, hd, sizeof(hd));
|
||||
droiddeck_log("layer", "%s: gralloc handle is not a QTI one (%d fds, %d ints: %s): no UBWC request; "
|
||||
"pool buffers are imported %s", l->name, nh ? nh->numFds : -1, nh ? nh->numInts : -1, hd,
|
||||
vkp_can_import_ahb() ? "as AHardwareBuffers (the driver takes gralloc's own layout)"
|
||||
: "as linear dma-bufs (this driver has no AHardwareBuffer import)");
|
||||
AHardwareBuffer_release(ahb);
|
||||
l->alloc_tier = TIER_LINEAR;
|
||||
droiddeck_log("layer", "%s: gralloc handle layout unknown (%d fds, %d ints): using linear pool buffers",
|
||||
l->name, nh ? nh->numFds : -1, nh ? nh->numInts : -1);
|
||||
l->alloc_tier = vkp_can_import_ahb() ? TIER_PLAIN : TIER_LINEAR;
|
||||
continue;
|
||||
}
|
||||
mod = MOD_LINEAR;
|
||||
mod = SC_MOD_GRALLOC;
|
||||
path = "AHardwareBuffer";
|
||||
img = vkp_image_import_ahb(ahb, info, sizeof(info));
|
||||
if (!img && tier == TIER_LINEAR) {
|
||||
const off_t need = (off_t)got.stride * 4 * h;
|
||||
int fd = -1, which = -1;
|
||||
for (int i = 0; nh && i < nh->numFds; i++) {
|
||||
off_t sz = lseek(nh->data[i], 0, SEEK_END);
|
||||
if (sz >= 0) lseek(nh->data[i], 0, SEEK_SET);
|
||||
if (sz >= need) { fd = nh->data[i]; which = i; break; }
|
||||
}
|
||||
if (fd < 0 && nh && nh->numFds > 0) { fd = nh->data[0]; which = 0; }
|
||||
mod = MOD_LINEAR;
|
||||
path = "linear dma-buf";
|
||||
img = fd >= 0 ? vkp_image_import_dmabuf(fd, fmt == AHB_RGB10A2 ? DRM_ABGR2101010 : DRM_ABGR8888, mod,
|
||||
w, h, got.stride * 4, 0, 1) : NULL;
|
||||
snprintf(info, sizeof(info), "handle fd %d of %d", which, nh ? nh->numFds : 0);
|
||||
if (vkp_can_import_ahb())
|
||||
droiddeck_log("layer", "%s: AHardwareBuffer import failed: the linear dma-buf in the handle's fd %d "
|
||||
"(of %d) -> %s", l->name, which, nh ? nh->numFds : 0, img ? "imported" : "failed too");
|
||||
}
|
||||
}
|
||||
int fd = (nh && nh->numFds > 0) ? nh->data[0] : -1;
|
||||
struct vkp_image *img = fd >= 0 ? vkp_image_import_dmabuf(fd, fmt == AHB_RGB10A2 ? DRM_ABGR2101010 : DRM_ABGR8888,
|
||||
mod, w, h, got.stride * 4, 0, 1) : NULL;
|
||||
if (!img) {
|
||||
droiddeck_log("layer", "%s: import of a %s %dx%d pool buffer (stride %u px) into the compositor's Turnip failed",
|
||||
l->name, mod == MOD_QCOM_COMPRESSED ? "UBWC" : "linear", w, h, got.stride);
|
||||
char hd[256];
|
||||
describe_handle(nh, hd, sizeof(hd));
|
||||
droiddeck_log("layer", "%s: import of a %s %dx%d pool buffer (stride %u px, %s, usage %#llx) into the "
|
||||
"compositor's Turnip failed via %s; gralloc handle %d fds / %d ints: %s", l->name,
|
||||
pool_kind(mod), w, h, got.stride, tier_name(tier), (unsigned long long)got.usage, path,
|
||||
nh ? nh->numFds : -1, nh ? nh->numInts : -1, hd);
|
||||
AHardwareBuffer_release(ahb);
|
||||
if (tier < TIER_LINEAR) { l->alloc_tier = tier + 1; continue; }
|
||||
g_alloc_failed = 1;
|
||||
@@ -442,10 +494,11 @@ static int alloc_slot(struct layer *l, struct slot *s, int w, int h, uint32_t fm
|
||||
if (l->logged_w != w || l->logged_h != h || l->logged_fmt != fmt || l->logged_mod != mod ||
|
||||
l->logged_tier != tier) {
|
||||
l->logged_w = w; l->logged_h = h; l->logged_fmt = fmt; l->logged_mod = mod; l->logged_tier = tier;
|
||||
droiddeck_log("layer", "%s: pool buffers %dx%d%s: %s (%s), stride %u px, up to %d buffers (gralloc handle %d fds / %d ints)",
|
||||
l->name, w, h, fmt == AHB_RGB10A2 ? " 10-bit RGBA1010102" : "",
|
||||
mod == MOD_QCOM_COMPRESSED ? "UBWC (QCOM_COMPRESSED)" : "linear", tier_name(tier),
|
||||
got.stride, l->pool_n, nh ? nh->numFds : -1, nh ? nh->numInts : -1);
|
||||
droiddeck_log("layer", "%s: pool buffers %dx%d%s: %s (%s), stride %u px, up to %d buffers (gralloc handle %d fds / "
|
||||
"%d ints), imported as %s%s%s%s", l->name, w, h, fmt == AHB_RGB10A2 ? " 10-bit RGBA1010102" : "",
|
||||
mod == MOD_QCOM_COMPRESSED ? "UBWC (QCOM_COMPRESSED)" : pool_kind(mod), tier_name(tier),
|
||||
got.stride, l->pool_n, nh ? nh->numFds : -1, nh ? nh->numInts : -1, path,
|
||||
info[0] ? " (" : "", info, info[0] ? ")" : "");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -814,7 +867,7 @@ int sc_layer_present(struct vkp_image *src, int scene_w, int scene_h, const stru
|
||||
l->first_logged = 1;
|
||||
droiddeck_log("layer", "presenting %dx%d game frames on their own SurfaceControl layer (%s pool, %d buffers); "
|
||||
"HUD and pointer stay Android views above it", sw, sh,
|
||||
l->pool_modifier == MOD_QCOM_COMPRESSED ? "UBWC" : "linear", l->pool_n);
|
||||
pool_kind(l->pool_modifier), l->pool_n);
|
||||
}
|
||||
vkp_signal_first_frame();
|
||||
return 0;
|
||||
@@ -836,7 +889,7 @@ int sc_layer_present_pass(const struct vkp_draw *draws, int n, int scene_w, int
|
||||
l->first_logged = 1;
|
||||
droiddeck_log("layer", "presenting %dx%d frames on their own SurfaceControl layer (%s pool, %d buffers); "
|
||||
"HUD and pointer stay Android views above it", rw, rh,
|
||||
l->pool_modifier == MOD_QCOM_COMPRESSED ? "UBWC" : "linear", l->pool_n);
|
||||
pool_kind(l->pool_modifier), l->pool_n);
|
||||
}
|
||||
vkp_signal_first_frame();
|
||||
return 0;
|
||||
@@ -874,12 +927,12 @@ int sc_layer_present_hdr_scene(const struct vkp_draw *draws, int n, const struct
|
||||
if (tm)
|
||||
droiddeck_log("color", "tone-mapped picture on the game's display layer: %dx%d, %s 8-bit buffers, untagged "
|
||||
"(sRGB) - HDR output is switched off", rw, rh,
|
||||
l->pool_modifier == MOD_QCOM_COMPRESSED ? "UBWC" : "linear");
|
||||
pool_kind(l->pool_modifier));
|
||||
else {
|
||||
char cov[96];
|
||||
coverage_text(l, cov, sizeof(cov));
|
||||
droiddeck_log("color", "HDR picture on its own display layer: %dx%d, %s %s buffers, tagged %s%s%s", rw, rh,
|
||||
l->pool_modifier == MOD_QCOM_COMPRESSED ? "UBWC" : "linear",
|
||||
pool_kind(l->pool_modifier),
|
||||
g_hdr_pool_fmt == AHB_RGB10A2 ? "10-bit" : "8-bit",
|
||||
color && color->dataspace == DROIDDECK_ADATASPACE_BT2020_PQ ? "BT2020_PQ" : "HDR",
|
||||
cov[0] ? ", " : "", cov);
|
||||
|
||||
@@ -94,6 +94,9 @@ static int g_black_state;
|
||||
static PFN_vkImportSemaphoreFdKHR g_import_sem_fd;
|
||||
static VkSemaphore g_wait_sem;
|
||||
|
||||
#define VKP_VENDOR_QUALCOMM 0x5143
|
||||
static uint32_t g_vendor_id;
|
||||
|
||||
static struct vkp_perf g_perf;
|
||||
static int64_t perf_now(void) {
|
||||
struct timespec ts;
|
||||
@@ -461,6 +464,7 @@ static int dev_init(void) {
|
||||
{
|
||||
VkPhysicalDeviceProperties props;
|
||||
g_vk.GetPhysicalDeviceProperties(g_pd, &props);
|
||||
g_vendor_id = props.vendorID;
|
||||
snprintf(g_gpu_name, sizeof(g_gpu_name), "%s", props.deviceName);
|
||||
droiddeck_log("gpu", "compositor renders on %s with %s", props.deviceName,
|
||||
g_library_name ? g_library_name : "the system Vulkan driver");
|
||||
@@ -991,8 +995,9 @@ struct vkp_image *vkp_image_import_dmabuf(int fd, uint32_t drm_format, uint64_t
|
||||
.allocationSize = req.size, .memoryTypeIndex = (uint32_t)idx};
|
||||
VkResult mr = g_vk.AllocateMemory(g_dev, &mai, NULL, &img->mem);
|
||||
if (mr != VK_SUCCESS) {
|
||||
LOGE("%s: importing the %s dma-buf (%dx%d, %llu bytes) -> %s", as_blit_dst ? "layer" : "dmabuf",
|
||||
vkp_modifier_name(modifier), w, h, (unsigned long long)req.size, vk_result_name(mr));
|
||||
LOGE("%s: importing the %s dma-buf (%dx%d, pitch %u, offset %u, %llu bytes, memory type %d of image types "
|
||||
"%#x & fd types %#x) -> %s", as_blit_dst ? "layer" : "dmabuf", vkp_modifier_name(modifier), w, h,
|
||||
stride, offset, (unsigned long long)req.size, idx, req.memoryTypeBits, allowed, vk_result_name(mr));
|
||||
g_vk.DestroyImage(g_dev, img->image, NULL); close(dupfd); free(img); return NULL;
|
||||
}
|
||||
VkResult br = g_vk.BindImageMemory(g_dev, img->image, img->mem, 0);
|
||||
@@ -1059,6 +1064,101 @@ struct vkp_image *vkp_image_from_ahb(AHardwareBuffer *ahb) {
|
||||
return img;
|
||||
}
|
||||
|
||||
int vkp_can_import_ahb(void) {
|
||||
return dev_init() == 0 && g_vendor_id != VKP_VENDOR_QUALCOMM && g_ahb_import &&
|
||||
g_vk.GetAndroidHardwareBufferPropertiesANDROID;
|
||||
}
|
||||
|
||||
struct vkp_image *vkp_image_import_ahb(struct AHardwareBuffer *ahb, char *info, size_t info_n) {
|
||||
if (info && info_n) info[0] = 0;
|
||||
if (!ahb || !vkp_can_import_ahb()) return NULL;
|
||||
AHardwareBuffer_Desc d;
|
||||
AHardwareBuffer_describe(ahb, &d);
|
||||
VkAndroidHardwareBufferFormatPropertiesANDROID fp = {
|
||||
.sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID};
|
||||
VkAndroidHardwareBufferPropertiesANDROID hp = {
|
||||
.sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID, .pNext = &fp};
|
||||
VkResult pr = g_vk.GetAndroidHardwareBufferPropertiesANDROID(g_dev, ahb, &hp);
|
||||
if (pr != VK_SUCCESS) {
|
||||
LOGE("layer: vkGetAndroidHardwareBufferPropertiesANDROID(%ux%u, AHB format %#x, usage %#llx) -> %s", d.width,
|
||||
d.height, d.format, (unsigned long long)d.usage, vk_result_name(pr));
|
||||
return NULL;
|
||||
}
|
||||
if (fp.format == VK_FORMAT_UNDEFINED) {
|
||||
LOGE("layer: the driver reports the %ux%u AHB (format %#x) as external format %#llx only: no blit target",
|
||||
d.width, d.height, d.format, (unsigned long long)fp.externalFormat);
|
||||
return NULL;
|
||||
}
|
||||
const VkImageUsageFlags usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT;
|
||||
if (g_vk.GetPhysicalDeviceImageFormatProperties2) {
|
||||
VkPhysicalDeviceExternalImageFormatInfo ext = {
|
||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO,
|
||||
.handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID};
|
||||
VkPhysicalDeviceImageFormatInfo2 qi = {
|
||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, .pNext = &ext, .format = fp.format,
|
||||
.type = VK_IMAGE_TYPE_2D, .tiling = VK_IMAGE_TILING_OPTIMAL, .usage = usage};
|
||||
VkExternalImageFormatProperties extp = {.sType = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES};
|
||||
VkImageFormatProperties2 ip = {.sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2, .pNext = &extp};
|
||||
VkResult qr = g_vk.GetPhysicalDeviceImageFormatProperties2(g_pd, &qi, &ip);
|
||||
if (qr != VK_SUCCESS ||
|
||||
!(extp.externalMemoryProperties.externalMemoryFeatures & VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT)) {
|
||||
LOGE("layer: VkFormat %d as an imported AHB blit target is not supported (%s, external features %#x)",
|
||||
(int)fp.format, vk_result_name(qr), extp.externalMemoryProperties.externalMemoryFeatures);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
struct vkp_image *img = calloc(1, sizeof(*img));
|
||||
if (!img) return NULL;
|
||||
img->w = (int)d.width; img->h = (int)d.height;
|
||||
img->dmabuf = 1; img->blit_dst = 1;
|
||||
img->fmt = fp.format;
|
||||
VkExternalMemoryImageCreateInfo extImg = {
|
||||
.sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO,
|
||||
.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID};
|
||||
VkImageCreateInfo ici = {
|
||||
.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, .pNext = &extImg,
|
||||
.imageType = VK_IMAGE_TYPE_2D, .format = fp.format, .extent = {d.width, d.height, 1},
|
||||
.mipLevels = 1, .arrayLayers = 1, .samples = VK_SAMPLE_COUNT_1_BIT,
|
||||
.tiling = VK_IMAGE_TILING_OPTIMAL,
|
||||
.usage = usage, .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED};
|
||||
VkResult cr = g_vk.CreateImage(g_dev, &ici, NULL, &img->image);
|
||||
if (cr != VK_SUCCESS) {
|
||||
LOGE("layer: vkCreateImage(AHB %ux%u, VkFormat %d) -> %s", d.width, d.height, (int)fp.format,
|
||||
vk_result_name(cr));
|
||||
free(img); return NULL;
|
||||
}
|
||||
int idx = -1;
|
||||
for (int i = 0; i < 32; i++) if (hp.memoryTypeBits & (1u << i)) { idx = i; break; }
|
||||
if (idx < 0) {
|
||||
LOGE("layer: no memory type can import the %ux%u AHB (memoryTypeBits 0)", d.width, d.height);
|
||||
g_vk.DestroyImage(g_dev, img->image, NULL); free(img); return NULL;
|
||||
}
|
||||
VkImportAndroidHardwareBufferInfoANDROID imp = {
|
||||
.sType = VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID, .buffer = ahb};
|
||||
VkMemoryDedicatedAllocateInfo ded = {.sType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO,
|
||||
.pNext = &imp, .image = img->image};
|
||||
VkMemoryAllocateInfo mai = {.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, .pNext = &ded,
|
||||
.allocationSize = hp.allocationSize, .memoryTypeIndex = (uint32_t)idx};
|
||||
VkResult mr = g_vk.AllocateMemory(g_dev, &mai, NULL, &img->mem);
|
||||
if (mr != VK_SUCCESS) {
|
||||
LOGE("layer: importing the %ux%u AHB (VkFormat %d, %llu bytes, memory type %d of memoryTypeBits %#x) -> %s",
|
||||
d.width, d.height, (int)fp.format, (unsigned long long)hp.allocationSize, idx, hp.memoryTypeBits,
|
||||
vk_result_name(mr));
|
||||
g_vk.DestroyImage(g_dev, img->image, NULL); free(img); return NULL;
|
||||
}
|
||||
VkResult br = g_vk.BindImageMemory(g_dev, img->image, img->mem, 0);
|
||||
if (br != VK_SUCCESS) {
|
||||
LOGE("layer: vkBindImageMemory(AHB) -> %s", vk_result_name(br));
|
||||
g_vk.FreeMemory(g_dev, img->mem, NULL); g_vk.DestroyImage(g_dev, img->image, NULL);
|
||||
free(img); return NULL;
|
||||
}
|
||||
if (info && info_n)
|
||||
snprintf(info, info_n, "VkFormat %d, %llu bytes, memory type %d of memoryTypeBits %#x", (int)fp.format,
|
||||
(unsigned long long)hp.allocationSize, idx, hp.memoryTypeBits);
|
||||
return img;
|
||||
}
|
||||
|
||||
static int shm_sampled(void) {
|
||||
static int known;
|
||||
if (!known) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef VK_PRESENT_H
|
||||
#define VK_PRESENT_H
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <android/native_window.h>
|
||||
void vk_present_set_driver(const char *driver_path, const char *library_name,
|
||||
const char *native_lib_dir);
|
||||
@@ -33,6 +34,9 @@ struct vkp_image *vkp_image_import_dmabuf(int fd, uint32_t drm_format, uint64_t
|
||||
int w, int h, uint32_t stride, uint32_t offset,
|
||||
int as_blit_dst);
|
||||
int vkp_image_is_dmabuf(const struct vkp_image *img);
|
||||
struct AHardwareBuffer;
|
||||
int vkp_can_import_ahb(void);
|
||||
struct vkp_image *vkp_image_import_ahb(struct AHardwareBuffer *ahb, char *info, size_t info_n);
|
||||
|
||||
struct vkp_image *vkp_image_create_shm(int w, int h);
|
||||
struct AHardwareBuffer;
|
||||
|
||||
@@ -162,6 +162,10 @@ class FrontEndActivity : ComponentActivity() {
|
||||
private var gameCores by mutableStateOf<Set<Int>>(emptySet())
|
||||
private var tuSysmem by mutableStateOf(false)
|
||||
private var zinkLazy by mutableStateOf(false)
|
||||
private var vkBridge by mutableStateOf(false)
|
||||
private var vkBridgeSafe by mutableStateOf(true)
|
||||
private var bridgeProtonDxvk by mutableStateOf(false)
|
||||
private val adrenoGpu by lazy { com.droiddeck.launcher.core.DeviceSupport.adreno() }
|
||||
private var noXalia by mutableStateOf(true)
|
||||
private var fastSync by mutableStateOf(false)
|
||||
private var syncFallback by mutableStateOf(true)
|
||||
@@ -1040,6 +1044,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
FrontEndScreen(
|
||||
FrontEndState(
|
||||
installed = installed, ready = ready, available = available?.version, removalPending = removalPending, runtimeActionsBlocked = runtimeChangesBlocked(),
|
||||
vkBridge = vkBridge, vkBridgeSafe = vkBridgeSafe, bridgeProtonDxvk = bridgeProtonDxvk, adreno = adrenoGpu,
|
||||
shortcutPicker = shortcutPicker,
|
||||
shortcutLibraryScanning = shortcutLibraryScanning,
|
||||
gameSyncFolder = gameSyncFolder,
|
||||
@@ -1188,6 +1193,15 @@ class FrontEndActivity : ComponentActivity() {
|
||||
onInstallPackage = { id -> installPackage(id) },
|
||||
onRemovePackage = { id -> removePackage(id) },
|
||||
onRuntime = { onRuntimeButton() },
|
||||
onVkBridge = { on ->
|
||||
SessionPrefs.setVkBridge(this, on); vkBridge = on
|
||||
if (!on) com.droiddeck.launcher.session.ComponentsManager.settleAutoDxvk(this)
|
||||
},
|
||||
onVkBridgeSafe = { on -> SessionPrefs.setVkBridgeSafe(this, on); vkBridgeSafe = on },
|
||||
onBridgeProtonDxvk = { on ->
|
||||
SessionPrefs.setBridgeProtonDxvk(this, on); bridgeProtonDxvk = on
|
||||
if (on) com.droiddeck.launcher.session.ComponentsManager.settleAutoDxvk(this)
|
||||
},
|
||||
onFrameGenPick = { mode ->
|
||||
FrameGen.set(this, mode)
|
||||
frameGenLabel = FrameGen.label(this)
|
||||
@@ -2450,6 +2464,9 @@ class FrontEndActivity : ComponentActivity() {
|
||||
gameCores = CpuCores.parse(SessionPrefs.gameCpus(this)).ifEmpty { CpuCores.all.toSet() }
|
||||
tuSysmem = SessionPrefs.tuSysmem(this)
|
||||
zinkLazy = SessionPrefs.zinkLazy(this)
|
||||
vkBridge = SessionPrefs.vkBridge(this)
|
||||
vkBridgeSafe = SessionPrefs.vkBridgeSafe(this)
|
||||
bridgeProtonDxvk = SessionPrefs.bridgeProtonDxvk(this)
|
||||
noXalia = SessionPrefs.noXalia(this)
|
||||
fastSync = SessionPrefs.fastSync(this)
|
||||
syncFallback = SessionPrefs.syncFallback(this)
|
||||
@@ -2487,6 +2504,9 @@ class FrontEndActivity : ComponentActivity() {
|
||||
offline = OfflineMode.enabled(this)
|
||||
installed = LinuxRuntimeInstaller.installedVersion(this)
|
||||
ready = LinuxRuntime.isInstalled(this)
|
||||
vkBridge = SessionPrefs.vkBridge(this)
|
||||
vkBridgeSafe = SessionPrefs.vkBridgeSafe(this)
|
||||
bridgeProtonDxvk = SessionPrefs.bridgeProtonDxvk(this)
|
||||
removalPending = LinuxRuntimeInstaller.hasRemovalPending(this)
|
||||
ui.post { autoUpdateRuntime() }
|
||||
frameGenLabel = FrameGen.label(this)
|
||||
@@ -2591,7 +2611,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
Thread({ checkCatalog() }, "catalog").start()
|
||||
return
|
||||
}
|
||||
if (installed == null && !com.droiddeck.launcher.core.DeviceSupport.adreno()) { showNonAdreno = release; return }
|
||||
if (installed == null && !com.droiddeck.launcher.core.DeviceSupport.canDraw(this)) { showNonAdreno = release; return }
|
||||
install(release)
|
||||
}
|
||||
|
||||
@@ -2610,7 +2630,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
showPhantomGate = true
|
||||
return false
|
||||
}
|
||||
val warn = installed == null && !com.droiddeck.launcher.core.DeviceSupport.adreno()
|
||||
val warn = installed == null && !com.droiddeck.launcher.core.DeviceSupport.canDraw(this)
|
||||
if (warn && available != null) { showNonAdreno = available; return false }
|
||||
startActivity(intent)
|
||||
return true
|
||||
|
||||
@@ -6,8 +6,20 @@ import com.droiddeck.launcher.R
|
||||
import java.io.File
|
||||
|
||||
object DeviceSupport {
|
||||
fun adreno(): Boolean =
|
||||
private val adrenoGpu by lazy {
|
||||
File("/sys/class/kgsl/kgsl-3d0").exists() || File("/vendor/lib64/hw/vulkan.adreno.so").exists()
|
||||
}
|
||||
|
||||
private val maliGpu by lazy { !adrenoGpu && File("/dev/mali0").exists() }
|
||||
|
||||
fun adreno(): Boolean = adrenoGpu
|
||||
|
||||
fun mali(): Boolean = maliGpu
|
||||
|
||||
fun vkBridge(context: Context): Boolean =
|
||||
!adreno() && com.droiddeck.launcher.session.SessionPrefs.vkBridge(context)
|
||||
|
||||
fun canDraw(context: Context): Boolean = adreno() || vkBridge(context)
|
||||
|
||||
fun gpuName(context: Context): String {
|
||||
val soc = if (Build.VERSION.SDK_INT >= 31) Build.SOC_MODEL.takeIf { it.isNotBlank() && it != Build.UNKNOWN } else null
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.droiddeck.launcher.gpu
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.core.DeviceSupport
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import java.io.File
|
||||
|
||||
data class AppVulkan(
|
||||
val major: Int,
|
||||
val minor: Int,
|
||||
val shaderInt64: Boolean?,
|
||||
val maxPushConstants: Int?,
|
||||
val source: String,
|
||||
) {
|
||||
fun atLeast(major: Int, minor: Int): Boolean = this.major > major || (this.major == major && this.minor >= minor)
|
||||
|
||||
val label: String
|
||||
get() = "Vulkan $major.$minor, shaderInt64 ${shaderInt64?.let { if (it) "yes" else "no" } ?: "?"}, " +
|
||||
"push constants ${maxPushConstants ?: "?"} ($source)"
|
||||
|
||||
companion object {
|
||||
private const val TAG = "AppVulkan"
|
||||
const val BRIDGE_FILE = "apps-vulkan"
|
||||
|
||||
fun detect(context: Context): AppVulkan? {
|
||||
if (!DeviceSupport.vkBridge(context)) return null
|
||||
val native = VulkanInfo.query()
|
||||
val file = File(VkBridgeComponent.cacheDir(context), BRIDGE_FILE)
|
||||
val fromBridge = FileUtils.readString(file)?.let { fromBridgeFile(it, native["device"], native["api"]) }
|
||||
val found = fromBridge ?: fromDriver(native)
|
||||
Log.i(TAG, found?.label ?: "unknown (driver query: ${native["error"] ?: "no api line"})")
|
||||
return found
|
||||
}
|
||||
|
||||
internal fun fromBridgeFile(text: String, driverDevice: String?, driverApi: String? = null): AppVulkan? {
|
||||
val map = keyValues(text)
|
||||
val device = map["device"]
|
||||
if (device != null && driverDevice != null && device != driverDevice) return null
|
||||
val fileDriver = version(map["driver_api"])
|
||||
val native = version(driverApi)
|
||||
if (fileDriver != null && native != null && fileDriver != native) return null
|
||||
val promoted = map["promotion"]?.trim()?.lowercase() == "on"
|
||||
val (major, minor) = (if (promoted) version(map["api"]) else fileDriver ?: version(map["api"])) ?: return null
|
||||
return AppVulkan(major, minor, bool(map["shader_int64"]), map["max_push_constants"]?.toIntOrNull(),
|
||||
if (promoted) "bridge, promoted" else "bridge")
|
||||
}
|
||||
|
||||
internal fun fromDriver(map: Map<String, String>): AppVulkan? {
|
||||
val (major, minor) = version(map["api"]) ?: return null
|
||||
return AppVulkan(major, minor, bool(map["shader_int64"]), map["max_push_constants"]?.toIntOrNull(), "driver")
|
||||
}
|
||||
|
||||
private fun keyValues(text: String): Map<String, String> = text.lineSequence().mapNotNull { line ->
|
||||
val eq = line.indexOf('=')
|
||||
if (eq <= 0) null else line.substring(0, eq).trim() to line.substring(eq + 1).trim()
|
||||
}.toMap()
|
||||
|
||||
private fun version(v: String?): Pair<Int, Int>? {
|
||||
val parts = v?.trim()?.split('.') ?: return null
|
||||
if (parts.size < 2) return null
|
||||
val major = parts[0].toIntOrNull() ?: return null
|
||||
val minor = parts[1].toIntOrNull() ?: return null
|
||||
return major to minor
|
||||
}
|
||||
|
||||
private fun bool(v: String?): Boolean? = when (v?.trim()?.lowercase()) {
|
||||
"1", "yes", "true" -> true
|
||||
"0", "no", "false" -> false
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.droiddeck.launcher.gpu
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.os.PowerManager
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.core.SessionPart
|
||||
import java.io.File
|
||||
import java.io.FileWriter
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
|
||||
class ClockLogComponent(private val logFile: File) : SessionPart() {
|
||||
@Volatile private var running = false
|
||||
private var thread: Thread? = null
|
||||
|
||||
override fun start() {
|
||||
running = true
|
||||
thread = Thread({ run() }, "clock-log").apply { isDaemon = true; start() }
|
||||
}
|
||||
|
||||
override fun stop() {
|
||||
running = false
|
||||
thread?.interrupt()
|
||||
thread = null
|
||||
}
|
||||
|
||||
private fun run() {
|
||||
val policies = File("/sys/devices/system/cpu/cpufreq").listFiles { f -> f.name.startsWith("policy") }
|
||||
?.sortedBy { it.name.removePrefix("policy").toIntOrNull() ?: 0 } ?: emptyList()
|
||||
val gpuCandidates = gpuSources()
|
||||
val gpu = gpuCandidates.firstOrNull { !it.startsWith("/proc/") && firstNumber(it) != null }
|
||||
val power = app().getSystemService(Context.POWER_SERVICE) as? PowerManager
|
||||
val time = SimpleDateFormat("HH:mm:ss", Locale.US)
|
||||
try {
|
||||
FileWriter(logFile, true).use { w ->
|
||||
w.write("== clocks: ${Build.MANUFACTURER} ${Build.MODEL} (${Build.HARDWARE}), every ${PERIOD_MS / 1000}s\n")
|
||||
w.write("cpu policies: ${policies.joinToString { p -> p.name + " " + (File(p, "related_cpus").readTextOrNull()?.trim() ?: "?") }}\n")
|
||||
for (source in gpuCandidates) {
|
||||
val f = File(source)
|
||||
val state = when {
|
||||
!f.exists() -> continue
|
||||
firstNumber(source) != null -> "readable"
|
||||
else -> "refused"
|
||||
}
|
||||
w.write("gpu source $source: $state\n")
|
||||
}
|
||||
w.write("gpu clock from: ${gpu ?: "nothing readable"}\n")
|
||||
w.flush()
|
||||
while (running && logFile.length() < MAX_BYTES) {
|
||||
val line = StringBuilder(time.format(Date()))
|
||||
for (p in policies) {
|
||||
val cur = firstNumber(File(p, "scaling_cur_freq").path)
|
||||
val max = firstNumber(File(p, "scaling_max_freq").path)
|
||||
val hw = firstNumber(File(p, "cpuinfo_max_freq").path)
|
||||
line.append(" ${p.name.removePrefix("policy").let { "p$it" }} ${mhz(cur)}/${mhz(max)}")
|
||||
if (hw != null && max != null && max < hw) line.append("(of ${mhz(hw)})")
|
||||
}
|
||||
gpu?.let { line.append(" | gpu ${mhz(firstNumber(it))} MHz") }
|
||||
if (power != null && Build.VERSION.SDK_INT >= 29) {
|
||||
line.append(" | thermal ${power.currentThermalStatus}")
|
||||
if (Build.VERSION.SDK_INT >= 30) {
|
||||
val h = power.getThermalHeadroom(10)
|
||||
if (!h.isNaN()) line.append(String.format(Locale.US, " headroom %.2f", h))
|
||||
}
|
||||
}
|
||||
w.write(line.append('\n').toString())
|
||||
w.flush()
|
||||
try { Thread.sleep(PERIOD_MS) } catch (e: InterruptedException) { break }
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "clock log stopped: $e")
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "SessionService"
|
||||
private const val PERIOD_MS = 2000L
|
||||
private const val MAX_BYTES = 4L shl 20
|
||||
|
||||
private fun gpuSources(): List<String> {
|
||||
val list = mutableListOf(
|
||||
"/sys/kernel/ged/hal/current_freqency", "/sys/kernel/ged/hal/current_frequency",
|
||||
"/proc/gpufreqv2/gpufreq_status", "/proc/gpufreq/gpufreq_var_dump",
|
||||
"/sys/kernel/gpu/gpu_clock", "/sys/class/misc/mali0/device/cur_freq",
|
||||
"/sys/class/misc/mali0/device/clock",
|
||||
)
|
||||
File("/sys/class/devfreq").list()?.sorted()?.forEach { node ->
|
||||
if (node.contains("mali", true) || node.contains("gpu", true)) list.add("/sys/class/devfreq/$node/cur_freq")
|
||||
}
|
||||
return list.distinct()
|
||||
}
|
||||
|
||||
private fun File.readTextOrNull(): String? = runCatching { readText() }.getOrNull()
|
||||
|
||||
private fun firstNumber(path: String): Long? =
|
||||
runCatching { Regex("\\d+").find(File(path).readText())?.value?.toLong() }.getOrNull()
|
||||
|
||||
private fun mhz(raw: Long?): String = when {
|
||||
raw == null -> "?"
|
||||
raw > 10_000_000 -> (raw / 1_000_000).toString()
|
||||
raw > 10_000 -> (raw / 1_000).toString()
|
||||
else -> raw.toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -291,6 +291,10 @@ public final class TurnipDriver {
|
||||
}
|
||||
String quest = QuestExperimental.INSTANCE.defaultAndroidDriver();
|
||||
if (quest != null) return quest;
|
||||
if (com.droiddeck.launcher.core.DeviceSupport.INSTANCE.vkBridge(context)) {
|
||||
Log.i(TAG, "Mali bridge: the compositor uses the system Vulkan driver");
|
||||
return null;
|
||||
}
|
||||
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");
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.droiddeck.launcher.gpu
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Process
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.core.HostProcess
|
||||
import com.droiddeck.launcher.core.SessionPart
|
||||
import java.io.File
|
||||
|
||||
class VkBridgeComponent(private val socket: File, private val logFile: File) : SessionPart() {
|
||||
@Volatile private var pid = -1
|
||||
@Volatile private var exited = false
|
||||
|
||||
override fun start() {
|
||||
stop()
|
||||
val binary = File(app().applicationInfo.nativeLibraryDir, BINARY)
|
||||
if (!binary.isFile) {
|
||||
Log.e(TAG, "server missing at $binary; the session will have no Vulkan")
|
||||
return
|
||||
}
|
||||
socket.parentFile?.mkdirs()
|
||||
val cacheDir = cacheDir(app())
|
||||
writeMode(cacheDir, com.droiddeck.launcher.session.SessionPrefs.vkBridgeMode(app()))
|
||||
if (VkBridgeNative.start(app(), socket, logFile, cacheDir)) {
|
||||
Log.i(TAG, "server ready in the app's process at $socket")
|
||||
return
|
||||
}
|
||||
socket.delete()
|
||||
exited = false
|
||||
val cmd = listOf(binary.absolutePath, "--socket", socket.absolutePath, "--log", logFile.absolutePath,
|
||||
"--cache-dir", cacheDir.absolutePath)
|
||||
.joinToString(" ") { it.replace("\\", "\\\\").replace(" ", "\\ ") }
|
||||
val env = arrayOf("HOME=" + app().filesDir)
|
||||
pid = HostProcess.start(cmd, env, app().filesDir, { status ->
|
||||
exited = true
|
||||
Log.w(TAG, "server exited with status $status")
|
||||
runCatching { logFile.appendText("== vkbridge server exited with status $status\n") }
|
||||
}, { line -> Log.i(TAG, line) })
|
||||
val began = System.currentTimeMillis()
|
||||
val deadline = began + 15_000L
|
||||
while (!socket.exists() && !exited && System.currentTimeMillis() < deadline) {
|
||||
try { Thread.sleep(50L) } catch (e: InterruptedException) { Thread.currentThread().interrupt(); break }
|
||||
}
|
||||
val waited = System.currentTimeMillis() - began
|
||||
Log.i(TAG, if (socket.exists()) "server ready (pid $pid) at $socket after $waited ms"
|
||||
else "server NOT ready (pid $pid, exited=$exited) after $waited ms; see $logFile")
|
||||
if (!socket.exists() && VkBridgeNative.start(app(), socket, logFile, cacheDir)) Log.i(TAG, "server ready in the app's process at $socket")
|
||||
}
|
||||
|
||||
override fun stop() {
|
||||
if (pid > 0) {
|
||||
Process.killProcess(pid)
|
||||
pid = -1
|
||||
}
|
||||
if (!VkBridgeNative.serving) socket.delete()
|
||||
}
|
||||
|
||||
override fun suspendPid(): Int = pid
|
||||
|
||||
companion object {
|
||||
private const val TAG = "VkBridge"
|
||||
private const val CACHE_DIR = "vkbridge-pipelines"
|
||||
private const val MODE_FILE = "mode"
|
||||
|
||||
fun cacheDir(context: Context): File {
|
||||
val dir = File(context.filesDir, CACHE_DIR)
|
||||
val old = File(context.cacheDir, CACHE_DIR)
|
||||
if (old.isDirectory) migrate(old, dir)
|
||||
dir.mkdirs()
|
||||
return dir
|
||||
}
|
||||
|
||||
fun writeMode(dir: File, mode: String) {
|
||||
val file = File(dir, MODE_FILE)
|
||||
if (runCatching { file.readText().trim() }.getOrNull() == mode) return
|
||||
val tmp = File(dir, "$MODE_FILE.tmp")
|
||||
runCatching {
|
||||
tmp.writeText(mode + "\n")
|
||||
if (!tmp.renameTo(file)) error("rename failed")
|
||||
Log.i(TAG, "bridge mode: $mode")
|
||||
}.onFailure { Log.w(TAG, "could not write $file: $it"); tmp.delete() }
|
||||
}
|
||||
|
||||
private fun migrate(old: File, dir: File) {
|
||||
val moved = if (!dir.exists()) old.renameTo(dir) else false
|
||||
if (!moved) {
|
||||
dir.mkdirs()
|
||||
old.listFiles()?.forEach { f ->
|
||||
val to = File(dir, f.name)
|
||||
if (to.exists()) return@forEach
|
||||
if (!f.renameTo(to)) runCatching { f.copyRecursively(to, overwrite = false) }
|
||||
}
|
||||
old.deleteRecursively()
|
||||
}
|
||||
Log.i(TAG, "bridge cache moved from $old to $dir")
|
||||
}
|
||||
|
||||
const val BINARY = "libvkbridge_server.so"
|
||||
const val GUEST_ICD = "/usr/local/share/vkbridge/droidbridge_icd.json"
|
||||
const val GUEST_LIB = "/usr/local/lib/vkbridge/libvulkan_droidbridge.so"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.droiddeck.launcher.gpu
|
||||
|
||||
import android.content.Context
|
||||
import android.content.pm.ApplicationInfo
|
||||
import android.util.Log
|
||||
import java.io.File
|
||||
|
||||
object VkBridgeNative {
|
||||
private const val TAG = "VkBridge"
|
||||
|
||||
@Volatile private var loaded: Boolean? = null
|
||||
|
||||
private fun load(context: Context): Boolean {
|
||||
loaded?.let { return it }
|
||||
val ok = try {
|
||||
val dev = File(context.filesDir, "vkbridge/dev/libvkbridge_jni.so")
|
||||
val debuggable = context.applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE != 0
|
||||
if (debuggable && dev.isFile) {
|
||||
Log.w(TAG, "in-app server from the development override $dev")
|
||||
System.load(dev.absolutePath)
|
||||
} else {
|
||||
System.loadLibrary("vkbridge_jni")
|
||||
}
|
||||
true
|
||||
} catch (e: Throwable) {
|
||||
Log.w(TAG, "in-app server unavailable: $e")
|
||||
false
|
||||
}
|
||||
loaded = ok
|
||||
return ok
|
||||
}
|
||||
|
||||
@Volatile var serving = false
|
||||
private set
|
||||
|
||||
fun start(context: Context, socket: File, log: File, cacheDir: File): Boolean {
|
||||
if (!load(context)) return false
|
||||
val ok = try {
|
||||
nativeStart(socket.absolutePath, log.absolutePath, cacheDir.absolutePath) == 1
|
||||
} catch (e: Throwable) {
|
||||
Log.w(TAG, "in-app server failed to start: $e")
|
||||
false
|
||||
}
|
||||
if (ok) serving = true
|
||||
return ok
|
||||
}
|
||||
|
||||
@JvmStatic private external fun nativeStart(socket: String, log: String, cacheDir: String): Int
|
||||
}
|
||||
@@ -200,6 +200,7 @@ object BwrapSpawner {
|
||||
LIB_DIRS.map { File(rootfs, "$it/$name") }.firstOrNull { it.exists() }
|
||||
|
||||
private fun gpu(rootfs: String, root: File, env: MutableMap<String, String>): List<Bind>? {
|
||||
env["VKBRIDGE_SOCKET"]?.let { sock -> if (File(sock).exists()) return bridgeGpu(rootfs, root, env, sock) }
|
||||
val driver = runtimeLib(rootfs, "libvulkan_freedreno.so")
|
||||
if (driver == null || !File("/dev/kgsl-3d0").exists()) return null
|
||||
if (env.containsKey("VK_ICD_FILENAMES") || env.containsKey("VK_DRIVER_FILES")) return null
|
||||
@@ -222,6 +223,28 @@ object BwrapSpawner {
|
||||
return binds
|
||||
}
|
||||
|
||||
private fun bridgeGpu(rootfs: String, root: File, env: MutableMap<String, String>, socket: String): List<Bind>? {
|
||||
val driver = File(rootfs, "usr/local/lib/vkbridge/libvulkan_droidbridge.so")
|
||||
if (!driver.isFile) { Log.w(TAG, "gpu: vkbridge session but no bridge ICD in the runtime"); return null }
|
||||
val binds = ArrayList<Bind>()
|
||||
binds.add(Bind(driver.canonicalPath, "$GPU_DIR/libvulkan_droidbridge.so"))
|
||||
val sockDir = File(socket).parent ?: return null
|
||||
binds.add(Bind(sockDir, sockDir))
|
||||
val icd = File(root.parentFile, "vkbridge_icd.json")
|
||||
val api = runCatching {
|
||||
JSONObject(File(rootfs, "usr/local/share/vkbridge/droidbridge_icd.json").readText()).getJSONObject("ICD").getString("api_version")
|
||||
}.getOrNull() ?: run { Log.w(TAG, "gpu: vkbridge session but the runtime's bridge manifest is unreadable"); return null }
|
||||
icd.writeText("{\"file_format_version\": \"1.0.0\", \"ICD\": {\"library_path\": \"$GPU_DIR/libvulkan_droidbridge.so\", \"api_version\": \"$api\"}}\n")
|
||||
binds.add(Bind(icd.path, "$GPU_DIR/vkbridge_icd.json"))
|
||||
env["VK_DRIVER_FILES"] = "$GPU_DIR/vkbridge_icd.json"
|
||||
env["VK_ICD_FILENAMES"] = "$GPU_DIR/vkbridge_icd.json"
|
||||
if (!env.containsKey("MESA_LOADER_DRIVER_OVERRIDE") && !env.containsKey("GALLIUM_DRIVER")) {
|
||||
env["MESA_LOADER_DRIVER_OVERRIDE"] = "zink"
|
||||
env["GALLIUM_DRIVER"] = "zink"
|
||||
}
|
||||
return binds
|
||||
}
|
||||
|
||||
private fun preload(session: List<Bind>, rootfs: String, env: MutableMap<String, String>): List<Bind> {
|
||||
val libs = FileUtils.readString(File(rootfs, "etc/ld.so.preload"))?.lines()
|
||||
?.map { it.trim() }?.filter { it.startsWith("/") && File(rootfs + it).isFile } ?: return emptyList()
|
||||
|
||||
@@ -284,10 +284,32 @@ public final class LinuxRuntime {
|
||||
return false;
|
||||
}
|
||||
|
||||
private static final String MALI_DEVICE = "/dev/mali0";
|
||||
|
||||
public static String gpuStandIn(Context context) {
|
||||
if (new File(KGSL_DEVICE).exists()) return KGSL_DEVICE;
|
||||
if (com.droiddeck.launcher.core.DeviceSupport.INSTANCE.vkBridge(context) && new File(MALI_DEVICE).exists()) return MALI_DEVICE;
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String deviceNumbers(String path) {
|
||||
try {
|
||||
long dev = Os.stat(path).st_rdev;
|
||||
long major = ((dev >> 8) & 0xfff) | ((dev >> 32) & ~0xfffL);
|
||||
long minor = (dev & 0xff) | ((dev >> 12) & ~0xffL);
|
||||
return major + ":" + minor;
|
||||
} catch (ErrnoException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static void bindGpuNode(Context context, List<String> cmd) {
|
||||
String standIn = gpuStandIn(context);
|
||||
if (standIn == null) return;
|
||||
boolean kgsl = standIn.equals(KGSL_DEVICE);
|
||||
StructStat st;
|
||||
try {
|
||||
st = Os.stat(KGSL_DEVICE);
|
||||
st = Os.stat(standIn);
|
||||
} catch (ErrnoException e) {
|
||||
return;
|
||||
}
|
||||
@@ -307,13 +329,14 @@ public final class LinuxRuntime {
|
||||
Files.write(new File(drm, "dev").toPath(),
|
||||
(major + ":" + minor + "\n").getBytes(StandardCharsets.UTF_8));
|
||||
Files.write(new File(device, "uevent").toPath(),
|
||||
"DRIVER=kgsl-3d0\nMODALIAS=platform:kgsl-3d0\n".getBytes(StandardCharsets.UTF_8));
|
||||
(kgsl ? "DRIVER=kgsl-3d0\nMODALIAS=platform:kgsl-3d0\n" : "DRIVER=mali\nMODALIAS=platform:mali\n")
|
||||
.getBytes(StandardCharsets.UTF_8));
|
||||
File subsystem = new File(device, "subsystem");
|
||||
if (!Files.isSymbolicLink(subsystem.toPath())) {
|
||||
Os.symlink("/sys/bus/platform", subsystem.getPath());
|
||||
}
|
||||
File driver = new File(device, "driver");
|
||||
if (!Files.isSymbolicLink(driver.toPath())) {
|
||||
if (kgsl && !Files.isSymbolicLink(driver.toPath())) {
|
||||
Os.symlink("/sys/bus/platform/drivers/msm_drm", driver.getPath());
|
||||
}
|
||||
} catch (IOException | ErrnoException e) {
|
||||
@@ -321,7 +344,7 @@ public final class LinuxRuntime {
|
||||
}
|
||||
bind(cmd, new File(base, "sys").getPath() + ":/sys/dev/char");
|
||||
bind(cmd, dri.getPath() + ":/dev/dri");
|
||||
bind(cmd, KGSL_DEVICE + ":/dev/dri/" + node);
|
||||
bind(cmd, standIn + ":/dev/dri/" + node);
|
||||
bindDrmClass(base, cmd, node, major + ":" + minor);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.util.Log
|
||||
import com.droiddeck.launcher.core.Downloader
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import com.droiddeck.launcher.core.GameEnvironment
|
||||
import com.droiddeck.launcher.gpu.AppVulkan
|
||||
import com.droiddeck.launcher.gpu.GpuInfo
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.github.luben.zstd.ZstdInputStream
|
||||
@@ -639,29 +640,31 @@ object ComponentsManager {
|
||||
}
|
||||
|
||||
|
||||
fun swap(context: Context, protonId: String, file: String): String = synchronized(lock) {
|
||||
fun swap(context: Context, protonId: String, file: String, auto: Boolean = false): String = synchronized(lock) {
|
||||
val p = proton(context, protonId)
|
||||
val wcp = File(packagesDir(context), safeName(file))
|
||||
val info = packageInfo(context, wcp)
|
||||
val state = loadState(context)
|
||||
if (inUse(context, p)) {
|
||||
state.sub("queued").sub(p.id).put(info.comp, JSONObject().put("kind", "package").put("file", wcp.name).put("label", info.version))
|
||||
state.sub("queued").sub(p.id).put(info.comp, JSONObject().put("kind", "package").put("file", wcp.name).put("label", info.version)
|
||||
.apply { if (auto) put("auto", true) })
|
||||
saveState(context, state)
|
||||
return context.getString(R.string.cmgr_swap_queued, LABEL[info.comp], info.version, p.name)
|
||||
}
|
||||
applyPackage(context, p, info, wcp, state)
|
||||
applyPackage(context, p, info, wcp, state, auto)
|
||||
state.sub("queued").optJSONObject(p.id)?.remove(info.comp)
|
||||
saveState(context, state)
|
||||
context.getString(R.string.cmgr_swap_done, LABEL[info.comp], info.version, p.name)
|
||||
}
|
||||
|
||||
private fun applyPackage(context: Context, p: Proton, info: Package, wcp: File, state: JSONObject) {
|
||||
private fun applyPackage(context: Context, p: Proton, info: Package, wcp: File, state: JSONObject, auto: Boolean = false) {
|
||||
ensureOriginal(context, p, info.comp, state)
|
||||
val hashes = installFiles(context, p.dir, info.comp, wcp)
|
||||
state.sub("active").sub(p.id).put(info.comp, JSONObject()
|
||||
.put("file", wcp.name).put("label", info.version).put("protonVersion", p.version)
|
||||
.put("files", JSONObject(hashes.filterKeys { owned(info.comp, it) } as Map<*, *>))
|
||||
.put("at", System.currentTimeMillis() / 1000))
|
||||
.put("at", System.currentTimeMillis() / 1000)
|
||||
.apply { if (auto) put("auto", true) })
|
||||
Log.i(TAG, "swapped ${info.comp} ${info.version} into ${p.name} ${p.version}")
|
||||
}
|
||||
|
||||
@@ -709,7 +712,7 @@ object ComponentsManager {
|
||||
applyOriginal(context, p, comp, v, File(originalsDir(context), "$pid/${safeName(v)}/$comp.wcp"), state)
|
||||
} else {
|
||||
val wcp = File(packagesDir(context), q.optString("file"))
|
||||
applyPackage(context, p, packageInfo(context, wcp), wcp, state)
|
||||
applyPackage(context, p, packageInfo(context, wcp), wcp, state, q.optBoolean("auto"))
|
||||
}
|
||||
done += "${LABEL[comp]} ${q.optString("label")} → ${p.name}"
|
||||
}.onFailure { Log.w(TAG, "queued $comp for ${p.name}", it) }
|
||||
@@ -1015,15 +1018,76 @@ object ComponentsManager {
|
||||
internal fun forcedPackageWanted(activeFile: String?, protonVersionMatches: Boolean): Boolean =
|
||||
activeFile.isNullOrEmpty() || !protonVersionMatches
|
||||
|
||||
internal fun bridgeDxvk(vk: AppVulkan?): ForcedPackage? = when {
|
||||
vk == null -> null
|
||||
!vk.atLeast(1, 1) -> null
|
||||
!vk.atLeast(1, 3) -> ForcedPackage(emptySet(), "dxvk", DXVK_FOR_VULKAN_1_1, "Dxvk-Linux")
|
||||
vk.shaderInt64 == false || (vk.maxPushConstants ?: 256) < 256 ->
|
||||
ForcedPackage(emptySet(), "dxvk", DXVK_FOR_VULKAN_1_3_NO_INT64, "Dxvk-Linux")
|
||||
else -> null
|
||||
}
|
||||
|
||||
internal const val DXVK_FOR_VULKAN_1_1 = "dxvk-1.10.3-linux.wcp"
|
||||
internal const val DXVK_FOR_VULKAN_1_3_NO_INT64 = "dxvk-2.6.2-linux.wcp"
|
||||
|
||||
internal fun autoDxvkUndoWanted(bridgeSession: Boolean, keepProtonDxvk: Boolean, vulkan: AppVulkan?, bridgeRule: ForcedPackage?): Boolean =
|
||||
!bridgeSession || keepProtonDxvk || (vulkan != null && bridgeRule == null)
|
||||
|
||||
private fun dropQueuedAuto(context: Context, installed: List<Proton>) = synchronized(lock) {
|
||||
val state = loadState(context)
|
||||
var changed = false
|
||||
for (p in installed) {
|
||||
val q = state.optJSONObject("queued")?.optJSONObject(p.id) ?: continue
|
||||
if (q.optJSONObject("dxvk")?.optBoolean("auto") == true) { q.remove("dxvk"); changed = true }
|
||||
}
|
||||
if (changed) saveState(context, state)
|
||||
}
|
||||
|
||||
internal fun autoChoiceStale(entry: JSONObject?, wantedFile: String?): Boolean =
|
||||
entry != null && entry.optBoolean("auto") && entry.optString("file") != wantedFile
|
||||
|
||||
internal fun catalogMatch(items: List<CatalogItem>, file: String, release: String): CatalogItem? =
|
||||
items.firstOrNull { it.file == file && it.release == release }
|
||||
|
||||
fun ensureForcedPackages(context: Context): String? = ensureForcedPackages(
|
||||
private val forcedLock = Any()
|
||||
|
||||
fun ensureForcedPackages(context: Context): String? = synchronized(forcedLock) { ensureForcedPackages(
|
||||
context, GpuInfo.detect(),
|
||||
{ file, release -> catalogItem(context, file, release) },
|
||||
{ download(context, it) {} },
|
||||
{ id, file -> swap(context, id, file) },
|
||||
)
|
||||
vulkan = AppVulkan.detect(context),
|
||||
bridgeSession = com.droiddeck.launcher.core.DeviceSupport.vkBridge(context),
|
||||
applyAuto = { id, file -> swap(context, id, file, auto = true) },
|
||||
undoAuto = { id, comp -> undoAutoChoice(context, id, comp) },
|
||||
keepProtonDxvk = SessionPrefs.bridgeProtonDxvk(context),
|
||||
autoPossible = !com.droiddeck.launcher.core.DeviceSupport.adreno(),
|
||||
) }
|
||||
|
||||
fun settleAutoDxvk(context: Context) {
|
||||
val app = context.applicationContext
|
||||
Thread({
|
||||
runCatching { ensureForcedPackages(app) }
|
||||
.onSuccess { if (it != null) Log.i(TAG, it) }
|
||||
.onFailure { Log.w(TAG, "automatic DXVK", it) }
|
||||
}, "auto-dxvk").start()
|
||||
}
|
||||
|
||||
internal fun undoAutoChoice(context: Context, protonId: String, comp: String): String = synchronized(lock) {
|
||||
val p = proton(context, protonId)
|
||||
val state = loadState(context)
|
||||
val entry = state.sub("active").optJSONObject(p.id)?.optJSONObject(comp)
|
||||
val sameProton = entry?.optString("protonVersion") == p.version
|
||||
if (sameProton && originalFile(context, p, comp).isFile)
|
||||
return restore(context, protonId, comp, safeName(p.version))
|
||||
if (sameProton) {
|
||||
Log.w(TAG, "${p.name}: its own ${LABEL[comp]} copy is gone; keeping ${entry?.optString("label")}")
|
||||
return "${LABEL[comp]}: ${p.name} keeps ${entry?.optString("label")} (its own copy is gone)"
|
||||
}
|
||||
state.sub("active").optJSONObject(p.id)?.remove(comp)
|
||||
saveState(context, state)
|
||||
"${LABEL[comp]}: ${p.name} keeps its own copy"
|
||||
}
|
||||
|
||||
internal fun ensureForcedPackages(
|
||||
context: Context,
|
||||
@@ -1031,16 +1095,35 @@ object ComponentsManager {
|
||||
lookup: (file: String, release: String) -> CatalogItem?,
|
||||
fetch: (CatalogItem) -> Unit,
|
||||
apply: (protonId: String, file: String) -> String,
|
||||
vulkan: AppVulkan? = null,
|
||||
bridgeSession: Boolean = false,
|
||||
applyAuto: (protonId: String, file: String) -> String = apply,
|
||||
undoAuto: (protonId: String, comp: String) -> String = { _, _ -> "" },
|
||||
keepProtonDxvk: Boolean = false,
|
||||
autoPossible: Boolean = true,
|
||||
): String? {
|
||||
val rules = FORCED_PACKAGES.filter { it.matches(gpu) }
|
||||
if (rules.isEmpty()) return null
|
||||
val chooseDxvk = bridgeSession && !keepProtonDxvk
|
||||
val bridgeRule = if (chooseDxvk) bridgeDxvk(vulkan) else null
|
||||
val rules = FORCED_PACKAGES.filter { it.matches(gpu) }.map { it to false } + listOfNotNull(bridgeRule?.let { it to true })
|
||||
if (rules.isEmpty() && !autoPossible) return null
|
||||
val installed = protons(context)
|
||||
val lines = mutableListOf<String>()
|
||||
for (rule in rules) {
|
||||
fun each(p: Proton, what: () -> String): String =
|
||||
runCatching(what).getOrElse { e -> Log.w(TAG, "${p.name}: ${e.message}", e); "${p.name}: ${e.message ?: e.javaClass.simpleName}" }
|
||||
if (autoPossible && autoDxvkUndoWanted(bridgeSession, keepProtonDxvk, vulkan, bridgeRule)) {
|
||||
dropQueuedAuto(context, installed)
|
||||
val state = loadState(context)
|
||||
for (p in installed) {
|
||||
val entry = state.optJSONObject("active")?.optJSONObject(p.id)?.optJSONObject("dxvk")
|
||||
if (autoChoiceStale(entry, null)) lines.add(each(p) { undoAuto(p.id, "dxvk") })
|
||||
}
|
||||
}
|
||||
for ((rule, auto) in rules) {
|
||||
val state = loadState(context)
|
||||
val targets = installed.filter { p ->
|
||||
val active = state.optJSONObject("active")?.optJSONObject(p.id)?.optJSONObject(rule.comp)
|
||||
forcedPackageWanted(active?.optString("file"), active?.optString("protonVersion") == p.version)
|
||||
forcedPackageWanted(active?.optString("file"), active?.optString("protonVersion") == p.version) ||
|
||||
(auto && autoChoiceStale(active, rule.file))
|
||||
}
|
||||
if (targets.isEmpty()) continue
|
||||
val missing = missingPackage(context, rule, lookup, fetch)
|
||||
@@ -1048,9 +1131,10 @@ object ComponentsManager {
|
||||
lines.add(missing)
|
||||
continue
|
||||
}
|
||||
lines.add(targets.joinToString("; ") { apply(it.id, rule.file) })
|
||||
if (auto) lines.add("${vulkan?.label}: DXVK ${rule.file}")
|
||||
lines.add(targets.joinToString("; ") { p -> if (auto) each(p) { applyAuto(p.id, rule.file) } else apply(p.id, rule.file) })
|
||||
}
|
||||
return lines.joinToString("; ").ifEmpty { null }
|
||||
return lines.filter { it.isNotEmpty() }.joinToString("; ").ifEmpty { null }
|
||||
}
|
||||
|
||||
private fun missingPackage(
|
||||
|
||||
@@ -167,6 +167,9 @@ object SessionFiles {
|
||||
"usr/local/bin/gamescope" to "usr/local/bin/gamescope",
|
||||
// The gamescope pack carries its own WSI layer (patch 0117); it replaces the runtime's stock copy.
|
||||
"usr/lib/libVkLayer_FROG_gamescope_wsi_aarch64.so" to "usr/lib/libVkLayer_FROG_gamescope_wsi_aarch64.so",
|
||||
"usr/local/lib/vkbridge/libvulkan_droidbridge.so" to "usr/local/lib/vkbridge/libvulkan_droidbridge.so",
|
||||
"usr/local/share/vkbridge/droidbridge_icd.json" to "usr/local/share/vkbridge/droidbridge_icd.json",
|
||||
"usr/local/bin/droiddeck-vkbridge-smoke" to "usr/local/bin/droiddeck-vkbridge-smoke",
|
||||
"usr/local/lib/droiddeck/uruntime" to "usr/local/lib/droiddeck/uruntime",
|
||||
"usr/local/lib/droiddeck-pipewire.tzst" to "usr/local/lib/droiddeck-pipewire.tzst",
|
||||
"usr/local/share/licenses/uruntime/LICENSE" to "usr/local/share/licenses/uruntime/LICENSE",
|
||||
|
||||
@@ -694,6 +694,29 @@ object SessionPrefs {
|
||||
|
||||
fun zinkLazy(context: Context): Boolean = prefs(context).getBoolean("zinkLazy", true)
|
||||
|
||||
@JvmStatic
|
||||
fun vkBridge(context: Context): Boolean = prefs(context).getBoolean("vkBridge", com.droiddeck.launcher.core.DeviceSupport.mali())
|
||||
|
||||
fun setVkBridge(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("vkBridge", on).apply()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun bridgeProtonDxvk(context: Context): Boolean = prefs(context).getBoolean("bridgeProtonDxvk", false)
|
||||
|
||||
fun setBridgeProtonDxvk(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("bridgeProtonDxvk", on).apply()
|
||||
}
|
||||
|
||||
fun vkBridgeSafe(context: Context): Boolean = prefs(context).getBoolean("vkBridgeSafe", true)
|
||||
|
||||
fun setVkBridgeSafe(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("vkBridgeSafe", on).apply()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun vkBridgeMode(context: Context): String = if (vkBridgeSafe(context)) "safe" else "performance"
|
||||
|
||||
fun setZinkLazy(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("zinkLazy", on).apply()
|
||||
}
|
||||
|
||||
@@ -522,6 +522,7 @@ class SessionService : Service() {
|
||||
components.add(encoder)
|
||||
guest.add("BL_VENC_SOCKET=" + encoder.socket.absolutePath)
|
||||
}
|
||||
startVkBridge(guest, sessionDir)
|
||||
|
||||
guest.add("BL_WIDTH=" + size.first)
|
||||
guest.add("BL_HEIGHT=" + size.second)
|
||||
@@ -780,7 +781,7 @@ class SessionService : Service() {
|
||||
?: SessionPrefs.androidDriver(this),
|
||||
linuxDriverId,
|
||||
)
|
||||
LinuxVulkanDriver.resolveIcdPath(this, linuxDriverId)
|
||||
if (!com.droiddeck.launcher.core.DeviceSupport.vkBridge(this)) LinuxVulkanDriver.resolveIcdPath(this, linuxDriverId)
|
||||
?.let { guest.add(LinuxVulkanDriver.ENV + "=" + it) }
|
||||
val tuOverride = tuDebugOverride()
|
||||
val tuDriver = sysmemDriver(linuxDriverId)
|
||||
@@ -834,6 +835,27 @@ class SessionService : Service() {
|
||||
private fun noSteamGame(): Boolean =
|
||||
SessionState.mode == MODE_RUN && SessionState.program in setOf(NoSteamLaunch.PROTON_RUN, NoSteamLaunch.EPIC, NoSteamLaunch.BATTLENET)
|
||||
|
||||
private fun startVkBridge(guest: MutableList<String>, sessionDir: File) {
|
||||
if (!com.droiddeck.launcher.core.DeviceSupport.vkBridge(this)) return
|
||||
val socket = File(filesDir, "vkbridge/server.sock")
|
||||
val bridge = com.droiddeck.launcher.gpu.VkBridgeComponent(socket, File(sessionDir, "vkbridge-server.log"))
|
||||
bridge.attach(this)
|
||||
components.add(bridge)
|
||||
com.droiddeck.launcher.gpu.ClockLogComponent(File(sessionDir, "vkbridge-clocks.log")).let {
|
||||
it.attach(this)
|
||||
components.add(it)
|
||||
}
|
||||
guest.add("BL_VKBRIDGE=1")
|
||||
guest.add("VKBRIDGE_SOCKET=" + socket.path)
|
||||
guest.add("VKBRIDGE_CLIENT_LOG=" + File(sessionDir, "vkbridge-client.log").path)
|
||||
guest.add("VKBRIDGE_MODE=" + SessionPrefs.vkBridgeMode(this))
|
||||
LinuxRuntime.gpuStandIn(this)?.let { node ->
|
||||
guest.add("BL_DRM_STANDIN=$node")
|
||||
LinuxRuntime.deviceNumbers(node)?.let { guest.add("VKBRIDGE_DRM_RENDER=$it") }
|
||||
}
|
||||
Log.i(TAG, "vkbridge: on (${com.droiddeck.launcher.core.DeviceSupport.gpuName(this)}, ${SessionPrefs.vkBridgeMode(this)} mode), socket $socket")
|
||||
}
|
||||
|
||||
private fun startAudio(guest: MutableList<String>, sessionDir: File, directAudioPack: Boolean): PulseAudioComponent {
|
||||
val wantsDirectAudio = directAudioPack &&
|
||||
(SessionState.mode == MODE_STEAM || SessionState.mode == MODE_DESKTOP || noSteamGame()) &&
|
||||
|
||||
@@ -149,6 +149,10 @@ class FrontEndState(
|
||||
val oscMode: String = SessionPrefs.OSC_AUTO,
|
||||
val controller: com.droiddeck.launcher.input.ControllerPrefs.Settings? = null,
|
||||
val phantomProcessStatus: PhantomProcessStatus = PhantomProcessStatus.NOT_APPLICABLE,
|
||||
val adreno: Boolean = true,
|
||||
val vkBridge: Boolean = false,
|
||||
val vkBridgeSafe: Boolean = true,
|
||||
val bridgeProtonDxvk: Boolean = false,
|
||||
val showPhantomGate: Boolean = false,
|
||||
val orientation: Int = android.content.pm.ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE,
|
||||
val launcherOrientation: Int = android.content.pm.ActivityInfo.SCREEN_ORIENTATION_USER,
|
||||
@@ -205,6 +209,9 @@ class FrontEndActions(
|
||||
val onInstallPackage: (String) -> Unit,
|
||||
val onRemovePackage: (String) -> Unit,
|
||||
val onRuntime: () -> Unit,
|
||||
val onVkBridge: (Boolean) -> Unit = {},
|
||||
val onVkBridgeSafe: (Boolean) -> Unit = {},
|
||||
val onBridgeProtonDxvk: (Boolean) -> Unit = {},
|
||||
val onFrameGenPick: (FrameGen.Mode) -> Unit,
|
||||
val onImportLossless: () -> Unit,
|
||||
val onProtons: () -> Unit,
|
||||
|
||||
@@ -244,9 +244,40 @@ internal fun SetupPanel(
|
||||
when (gpu.support) {
|
||||
com.droiddeck.launcher.gpu.GpuInfo.Support.TESTED -> stringResource(R.string.setup_gpu_detail, gpu.displayName(ctx), gpuName)
|
||||
com.droiddeck.launcher.gpu.GpuInfo.Support.UNTESTED -> stringResource(R.string.setup_gpu_untested_detail, gpu.displayName(ctx), gpu.supportText(ctx).replaceFirstChar { it.lowercase() })
|
||||
else -> stringResource(R.string.setup_gpu_unsupported_detail, gpuName)
|
||||
else -> if (s.vkBridge) stringResource(R.string.setup_gpu_bridge_detail, gpuName)
|
||||
else stringResource(R.string.setup_gpu_unsupported_detail, gpuName)
|
||||
},
|
||||
divider = divider || (!s.adreno && s.vkBridge),
|
||||
action = if (s.adreno) null else { {
|
||||
SecondaryButton(
|
||||
stringResource(if (s.vkBridge) R.string.setup_gpu_bridge_on else R.string.setup_gpu_bridge_off),
|
||||
enabled = !s.sessionRunning, compact = true, onClick = { a.onVkBridge(!s.vkBridge) },
|
||||
)
|
||||
} },
|
||||
)
|
||||
if (!s.adreno && s.vkBridge) CheckRow(
|
||||
CheckState.OK,
|
||||
stringResource(R.string.setup_bridge_safe),
|
||||
stringResource(if (s.vkBridgeSafe) R.string.setup_bridge_safe_on_detail else R.string.setup_bridge_safe_off_detail),
|
||||
divider = divider,
|
||||
action = {
|
||||
SecondaryButton(
|
||||
stringResource(if (s.vkBridgeSafe) R.string.setup_bridge_safe_on else R.string.setup_bridge_safe_off),
|
||||
enabled = !s.sessionRunning, compact = true, onClick = { a.onVkBridgeSafe(!s.vkBridgeSafe) },
|
||||
)
|
||||
},
|
||||
)
|
||||
if (!s.adreno && s.vkBridge) CheckRow(
|
||||
CheckState.OK,
|
||||
stringResource(R.string.setup_bridge_dxvk),
|
||||
stringResource(if (s.bridgeProtonDxvk) R.string.setup_bridge_dxvk_proton_detail else R.string.setup_bridge_dxvk_auto_detail),
|
||||
divider = divider,
|
||||
action = {
|
||||
SecondaryButton(
|
||||
stringResource(if (s.bridgeProtonDxvk) R.string.setup_bridge_dxvk_proton else R.string.setup_bridge_dxvk_auto),
|
||||
enabled = !s.sessionRunning, compact = true, onClick = { a.onBridgeProtonDxvk(!s.bridgeProtonDxvk) },
|
||||
)
|
||||
},
|
||||
)
|
||||
}
|
||||
val runtimeCheck: @Composable (Boolean) -> Unit = { divider ->
|
||||
|
||||
@@ -3476,6 +3476,19 @@
|
||||
<string name="integration_shortcuts_service">زر الشاشة الرئيسية في DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">يمرّر ضغطات زر الشاشة الرئيسية إلى Steam Guide عندما تكون جلسة Steam في المقدمة ويكون DroidDeck تطبيق الشاشة الرئيسية الافتراضي. لا يقرأ محتوى الشاشة.</string>
|
||||
<string name="integration_brightness_needed">فعّل «السطوع» من الإعداد → تكامل Steam</string>
|
||||
<string name="setup_gpu_bridge_off">جسر Mali: متوقف</string>
|
||||
<string name="setup_gpu_bridge_on">جسر Mali: يعمل</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s ليس Adreno. جسر Vulkan التجريبي يعمل: تعرض الجلسة الرسومات عبر برنامج تشغيل الهاتف نفسه. توقّع وجود أخطاء؛ أرسل سجلات الجلسة.</string>
|
||||
<string name="setup_bridge_safe">الوضع الآمن</string>
|
||||
<string name="setup_bridge_safe_on">الوضع الآمن: يعمل</string>
|
||||
<string name="setup_bridge_safe_off">الوضع الآمن: متوقف</string>
|
||||
<string name="setup_bridge_safe_on_detail">الأكثر توافقًا. يوصى به لجهاز جديد.</string>
|
||||
<string name="setup_bridge_safe_off_detail">أسرع حيث اجتاز معالج الرسومات هذا فحوصاته.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: تلقائي</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: الخاص بـ Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">يستخدم إصدار DXVK أقدم عندما يكون Vulkan في معالج الرسومات هذا أقدم من أن يدعم DXVK الخاص بـ Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">يحتفظ كل Proton بـ DXVK الخاص به، حتى عندما قد يكون Vulkan في معالج الرسومات هذا أقدم من اللازم.</string>
|
||||
<string name="apps_search_hint">البحث في التطبيقات</string>
|
||||
<string name="apps_no_match">لا توجد تطبيقات تطابق ”%1$s“.</string>
|
||||
<string name="apps_add_widget">إضافة أداة</string>
|
||||
|
||||
@@ -3341,6 +3341,19 @@
|
||||
<string name="integration_shortcuts_service">Botón de inicio de DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Pasa las pulsaciones del botón de inicio a Steam Guide mientras una sesión de Steam está en primer plano y DroidDeck es la app de inicio predeterminada. No lee el contenido de la pantalla.</string>
|
||||
<string name="integration_brightness_needed">Activa Brillo en Configuración → Integración con Steam</string>
|
||||
<string name="setup_gpu_bridge_off">Puente Mali: desactivado</string>
|
||||
<string name="setup_gpu_bridge_on">Puente Mali: activado</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s no es una Adreno. El puente Vulkan experimental está activado: la sesión dibuja a través del propio controlador del teléfono. Espera errores; envía los registros de la sesión.</string>
|
||||
<string name="setup_bridge_safe">Modo seguro</string>
|
||||
<string name="setup_bridge_safe_on">Modo seguro: activado</string>
|
||||
<string name="setup_bridge_safe_off">Modo seguro: desactivado</string>
|
||||
<string name="setup_bridge_safe_on_detail">El más compatible. Recomendado para un dispositivo nuevo.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Más rápido donde esta GPU pasó sus pruebas.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automático</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: el de Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Usa un DXVK más antiguo cuando el Vulkan de esta GPU es demasiado antiguo para el de Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Cada Proton conserva su propio DXVK, aunque el Vulkan de esta GPU pueda ser demasiado antiguo para él.</string>
|
||||
<string name="apps_search_hint">Buscar apps</string>
|
||||
<string name="apps_no_match">Ninguna app coincide con «%1$s».</string>
|
||||
<string name="apps_add_widget">Agregar widget</string>
|
||||
|
||||
@@ -3332,6 +3332,19 @@
|
||||
<string name="integration_shortcuts_service">Бутон за начален екран на DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Предава натисканията на бутона за начален екран към Steam Guide, докато сесия на Steam е на фокус и DroidDeck е приложението за начален екран по подразбиране. Не чете съдържанието на екрана.</string>
|
||||
<string name="integration_brightness_needed">Включете „Яркост“ в Настройка → Интеграция със Steam</string>
|
||||
<string name="setup_gpu_bridge_off">Mali мост: изкл.</string>
|
||||
<string name="setup_gpu_bridge_on">Mali мост: вкл.</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s не е Adreno. Експерименталният Vulkan мост е включен: сесията рисува през собствения драйвер на телефона. Очаквайте грешки; изпратете логовете на сесията.</string>
|
||||
<string name="setup_bridge_safe">Безопасен режим</string>
|
||||
<string name="setup_bridge_safe_on">Безопасен режим: вкл.</string>
|
||||
<string name="setup_bridge_safe_off">Безопасен режим: изкл.</string>
|
||||
<string name="setup_bridge_safe_on_detail">Най-съвместим. Препоръчва се за ново устройство.</string>
|
||||
<string name="setup_bridge_safe_off_detail">По-бързо там, където този GPU е минал проверките си.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: автоматично</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: на Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Използва по-стар DXVK, когато Vulkan на този GPU е твърде стар за този на Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Всеки Proton запазва своя DXVK, дори когато Vulkan на този GPU може да е твърде стар за него.</string>
|
||||
<string name="apps_search_hint">Търсене на приложения</string>
|
||||
<string name="apps_no_match">Няма приложения, отговарящи на „%1$s“.</string>
|
||||
<string name="apps_add_widget">Добавяне на приспособление</string>
|
||||
|
||||
@@ -3404,6 +3404,19 @@
|
||||
<string name="integration_shortcuts_service">Tlačítko Domů pro DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Předává stisky tlačítka Domů do Steam Guide, když je aktivní relace Steamu a DroidDeck je výchozí aplikací domovské obrazovky. Nečte obsah obrazovky.</string>
|
||||
<string name="integration_brightness_needed">Zapněte Jas v Příprava → Integrace se Steamem</string>
|
||||
<string name="setup_gpu_bridge_off">Most Mali: vypnuto</string>
|
||||
<string name="setup_gpu_bridge_on">Most Mali: zapnuto</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s není Adreno. Experimentální most Vulkan je zapnutý: relace vykresluje přes vlastní ovladač telefonu. Počítejte s chybami; pošlete protokoly relace.</string>
|
||||
<string name="setup_bridge_safe">Bezpečný režim</string>
|
||||
<string name="setup_bridge_safe_on">Bezpečný režim: zapnuto</string>
|
||||
<string name="setup_bridge_safe_off">Bezpečný režim: vypnuto</string>
|
||||
<string name="setup_bridge_safe_on_detail">Nejvyšší kompatibilita. Doporučeno pro nové zařízení.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Rychlejší tam, kde tento GPU prošel kontrolami.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automaticky</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: vlastní z Protonu</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Použije starší DXVK, pokud je Vulkan tohoto GPU pro DXVK z Protonu příliš starý.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Každý Proton si ponechá vlastní DXVK, i když pro něj může být Vulkan tohoto GPU příliš starý.</string>
|
||||
<string name="apps_search_hint">Hledat aplikace</string>
|
||||
<string name="apps_no_match">Výrazu „%1$s“ neodpovídá žádná aplikace.</string>
|
||||
<string name="apps_add_widget">Přidat widget</string>
|
||||
|
||||
@@ -3332,6 +3332,19 @@
|
||||
<string name="integration_shortcuts_service">DroidDeck Hjem-knap</string>
|
||||
<string name="integration_shortcuts_service_description">Sender tryk på Hjem-knappen til Steam Guide, mens en Steam-session er i fokus, og DroidDeck er standardstartskærmen. Læser ikke skærmindhold.</string>
|
||||
<string name="integration_brightness_needed">Slå Lysstyrke til under Opsætning → Steam-integration</string>
|
||||
<string name="setup_gpu_bridge_off">Mali-bro: fra</string>
|
||||
<string name="setup_gpu_bridge_on">Mali-bro: til</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s er ikke en Adreno. Den eksperimentelle Vulkan-bro er slået til: sessionen tegner gennem telefonens egen driver. Forvent fejl; send sessionslogfilerne.</string>
|
||||
<string name="setup_bridge_safe">Sikker tilstand</string>
|
||||
<string name="setup_bridge_safe_on">Sikker tilstand: til</string>
|
||||
<string name="setup_bridge_safe_off">Sikker tilstand: fra</string>
|
||||
<string name="setup_bridge_safe_on_detail">Mest kompatibel. Anbefales til en ny enhed.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Hurtigere, hvor denne GPU har bestået sine tjek.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automatisk</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: Protons egen</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Bruger en ældre DXVK, hvor denne GPU\'s Vulkan er for gammel til Protons.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Hver Proton beholder sin egen DXVK, også hvor denne GPU\'s Vulkan kan være for gammel til den.</string>
|
||||
<string name="apps_search_hint">Søg i apps</string>
|
||||
<string name="apps_no_match">Ingen apps matcher “%1$s”.</string>
|
||||
<string name="apps_add_widget">Tilføj widget</string>
|
||||
|
||||
@@ -3332,6 +3332,19 @@
|
||||
<string name="integration_shortcuts_service">DroidDeck-Home-Taste</string>
|
||||
<string name="integration_shortcuts_service_description">Leitet Drücke der Home-Taste an Steam Guide weiter, während eine Steam-Sitzung im Fokus ist und DroidDeck die Standard-Startbildschirm-App ist. Liest keine Bildschirminhalte.</string>
|
||||
<string name="integration_brightness_needed">Aktiviere Helligkeit unter Einrichtung → Steam-Integration</string>
|
||||
<string name="setup_gpu_bridge_off">Mali-Brücke: aus</string>
|
||||
<string name="setup_gpu_bridge_on">Mali-Brücke: an</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s ist kein Adreno. Die experimentelle Vulkan-Brücke ist an: Die Sitzung zeichnet über den eigenen Treiber des Telefons. Rechne mit Fehlern und sende die Sitzungsprotokolle.</string>
|
||||
<string name="setup_bridge_safe">Sicherer Modus</string>
|
||||
<string name="setup_bridge_safe_on">Sicherer Modus: an</string>
|
||||
<string name="setup_bridge_safe_off">Sicherer Modus: aus</string>
|
||||
<string name="setup_bridge_safe_on_detail">Am kompatibelsten. Empfohlen für ein neues Gerät.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Schneller, wo diese GPU ihre Prüfungen bestanden hat.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automatisch</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: von Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Nutzt ein älteres DXVK, wenn das Vulkan dieser GPU für das von Proton zu alt ist.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Jedes Proton behält sein eigenes DXVK, auch wenn das Vulkan dieser GPU dafür zu alt sein könnte.</string>
|
||||
<string name="apps_search_hint">Apps durchsuchen</string>
|
||||
<string name="apps_no_match">Keine Apps passen zu „%1$s“.</string>
|
||||
<string name="apps_add_widget">Widget hinzufügen</string>
|
||||
|
||||
@@ -3332,6 +3332,19 @@
|
||||
<string name="integration_shortcuts_service">Κουμπί Αρχικής DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Μεταβιβάζει τα πατήματα του κουμπιού Αρχικής στο Steam Guide όσο μια συνεδρία Steam είναι εστιασμένη και το DroidDeck είναι η προεπιλεγμένη εφαρμογή Αρχικής. Δεν διαβάζει το περιεχόμενο της οθόνης.</string>
|
||||
<string name="integration_brightness_needed">Ενεργοποιήστε τη Φωτεινότητα στη Ρύθμιση → Ενσωμάτωση Steam</string>
|
||||
<string name="setup_gpu_bridge_off">Γέφυρα Mali: ανενεργή</string>
|
||||
<string name="setup_gpu_bridge_on">Γέφυρα Mali: ενεργή</string>
|
||||
<string name="setup_gpu_bridge_detail">Η %1$s δεν είναι Adreno. Η πειραματική γέφυρα Vulkan είναι ενεργή: η συνεδρία σχεδιάζει μέσω του προγράμματος οδήγησης του ίδιου του τηλεφώνου. Αναμένετε σφάλματα· στείλτε τα αρχεία καταγραφής της συνεδρίας.</string>
|
||||
<string name="setup_bridge_safe">Ασφαλής λειτουργία</string>
|
||||
<string name="setup_bridge_safe_on">Ασφαλής λειτουργία: ενεργή</string>
|
||||
<string name="setup_bridge_safe_off">Ασφαλής λειτουργία: ανενεργή</string>
|
||||
<string name="setup_bridge_safe_on_detail">Μέγιστη συμβατότητα. Συνιστάται για νέα συσκευή.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Ταχύτερη όπου αυτή η GPU πέρασε τους ελέγχους της.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: αυτόματο</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: του Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Χρησιμοποιεί παλαιότερο DXVK όταν το Vulkan αυτής της GPU είναι πολύ παλιό για αυτό του Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Κάθε Proton κρατά το δικό του DXVK, ακόμη κι αν το Vulkan αυτής της GPU ίσως είναι πολύ παλιό για αυτό.</string>
|
||||
<string name="apps_search_hint">Αναζήτηση εφαρμογών</string>
|
||||
<string name="apps_no_match">Καμία εφαρμογή δεν ταιριάζει με «%1$s».</string>
|
||||
<string name="apps_add_widget">Προσθήκη γραφικού στοιχείου</string>
|
||||
|
||||
@@ -3368,6 +3368,19 @@
|
||||
<string name="integration_shortcuts_service">Botón de inicio de DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Pasa las pulsaciones del botón de inicio a Steam Guide mientras una sesión de Steam está en primer plano y DroidDeck es la app de inicio predeterminada. No lee el contenido de la pantalla.</string>
|
||||
<string name="integration_brightness_needed">Activa Brillo en Configuración → Integración con Steam</string>
|
||||
<string name="setup_gpu_bridge_off">Puente Mali: desactivado</string>
|
||||
<string name="setup_gpu_bridge_on">Puente Mali: activado</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s no es una Adreno. El puente Vulkan experimental está activado: la sesión dibuja a través del propio controlador del teléfono. Espera errores; envía los registros de la sesión.</string>
|
||||
<string name="setup_bridge_safe">Modo seguro</string>
|
||||
<string name="setup_bridge_safe_on">Modo seguro: activado</string>
|
||||
<string name="setup_bridge_safe_off">Modo seguro: desactivado</string>
|
||||
<string name="setup_bridge_safe_on_detail">El más compatible. Recomendado para un dispositivo nuevo.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Más rápido donde esta GPU superó sus comprobaciones.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automático</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: el de Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Usa un DXVK más antiguo cuando el Vulkan de esta GPU es demasiado antiguo para el de Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Cada Proton conserva su propio DXVK, aunque el Vulkan de esta GPU pueda ser demasiado antiguo para él.</string>
|
||||
<string name="apps_search_hint">Buscar aplicaciones</string>
|
||||
<string name="apps_no_match">Ninguna aplicación coincide con «%1$s».</string>
|
||||
<string name="apps_add_widget">Añadir widget</string>
|
||||
|
||||
@@ -3332,6 +3332,19 @@
|
||||
<string name="integration_shortcuts_service">DroidDeckin Koti-painike</string>
|
||||
<string name="integration_shortcuts_service_description">Välittää Koti-painikkeen painallukset Steam Guidelle, kun Steam-istunto on aktiivinen ja DroidDeck on oletusaloitusnäyttösovellus. Ei lue näytön sisältöä.</string>
|
||||
<string name="integration_brightness_needed">Ota Kirkkaus käyttöön kohdassa Käyttöönotto → Steam-integraatio</string>
|
||||
<string name="setup_gpu_bridge_off">Mali-silta: pois</string>
|
||||
<string name="setup_gpu_bridge_on">Mali-silta: päällä</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s ei ole Adreno. Kokeellinen Vulkan-silta on päällä: istunto piirtää puhelimen oman ajurin kautta. Odota virheitä; lähetä istunnon lokit.</string>
|
||||
<string name="setup_bridge_safe">Turvatila</string>
|
||||
<string name="setup_bridge_safe_on">Turvatila: päällä</string>
|
||||
<string name="setup_bridge_safe_off">Turvatila: pois</string>
|
||||
<string name="setup_bridge_safe_on_detail">Yhteensopivin. Suositellaan uudelle laitteelle.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Nopeampi siellä, missä tämä GPU läpäisi tarkistuksensa.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automaattinen</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: Protonin oma</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Käyttää vanhempaa DXVK:ta, kun tämän GPU:n Vulkan on liian vanha Protonin omalle.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Jokainen Proton pitää oman DXVK:nsa, vaikka tämän GPU:n Vulkan voi olla sille liian vanha.</string>
|
||||
<string name="apps_search_hint">Hae sovelluksia</string>
|
||||
<string name="apps_no_match">Mikään sovellus ei vastaa hakua ”%1$s”.</string>
|
||||
<string name="apps_add_widget">Lisää widget</string>
|
||||
|
||||
@@ -3368,6 +3368,19 @@
|
||||
<string name="integration_shortcuts_service">Bouton Accueil DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Transmet les appuis sur le bouton Accueil à Steam Guide lorsqu\'une session Steam est au premier plan et que DroidDeck est l\'application d\'écran d\'accueil par défaut. Ne lit pas le contenu de l\'écran.</string>
|
||||
<string name="integration_brightness_needed">Activez Luminosité dans Paramètres → Intégration Steam</string>
|
||||
<string name="setup_gpu_bridge_off">Pont Mali : désactivé</string>
|
||||
<string name="setup_gpu_bridge_on">Pont Mali : activé</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s n\'est pas un Adreno. Le pont Vulkan expérimental est activé : la session dessine via le pilote du téléphone lui-même. Attendez-vous à des bugs ; envoyez les journaux de session.</string>
|
||||
<string name="setup_bridge_safe">Mode sans échec</string>
|
||||
<string name="setup_bridge_safe_on">Mode sans échec : activé</string>
|
||||
<string name="setup_bridge_safe_off">Mode sans échec : désactivé</string>
|
||||
<string name="setup_bridge_safe_on_detail">Le plus compatible. Recommandé pour un nouvel appareil.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Plus rapide là où ce GPU a réussi ses vérifications.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK : automatique</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK : celui de Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Utilise un DXVK plus ancien quand le Vulkan de ce GPU est trop ancien pour celui de Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Chaque Proton garde son propre DXVK, même quand le Vulkan de ce GPU risque d\'être trop ancien pour lui.</string>
|
||||
<string name="apps_search_hint">Rechercher des applications</string>
|
||||
<string name="apps_no_match">Aucune application ne correspond à « %1$s ».</string>
|
||||
<string name="apps_add_widget">Ajouter un widget</string>
|
||||
|
||||
@@ -3332,6 +3332,19 @@
|
||||
<string name="integration_shortcuts_service">DroidDeck होम बटन</string>
|
||||
<string name="integration_shortcuts_service_description">जब Steam सेशन फ़ोकस में हो और DroidDeck डिफ़ॉल्ट होम ऐप हो, तब होम बटन दबाने को Steam Guide तक भेजता है। स्क्रीन की सामग्री नहीं पढ़ता।</string>
|
||||
<string name="integration_brightness_needed">Setup → Steam इंटीग्रेशन में ब्राइटनेस चालू करें</string>
|
||||
<string name="setup_gpu_bridge_off">Mali ब्रिज: बंद</string>
|
||||
<string name="setup_gpu_bridge_on">Mali ब्रिज: चालू</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s Adreno नहीं है। प्रायोगिक Vulkan ब्रिज चालू है: सत्र फ़ोन के अपने ड्राइवर से ड्रॉ करता है। बग की उम्मीद रखें; सत्र लॉग भेजें।</string>
|
||||
<string name="setup_bridge_safe">सुरक्षित मोड</string>
|
||||
<string name="setup_bridge_safe_on">सुरक्षित मोड: चालू</string>
|
||||
<string name="setup_bridge_safe_off">सुरक्षित मोड: बंद</string>
|
||||
<string name="setup_bridge_safe_on_detail">सबसे अधिक संगत। नए डिवाइस के लिए अनुशंसित।</string>
|
||||
<string name="setup_bridge_safe_off_detail">जहाँ इस GPU ने अपनी जाँचें पास कीं, वहाँ तेज़।</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: स्वचालित</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: Proton का अपना</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">जहाँ इस GPU का Vulkan Proton के DXVK के लिए बहुत पुराना है, वहाँ पुराना DXVK इस्तेमाल करता है।</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">हर Proton अपना DXVK रखता है, भले ही इस GPU का Vulkan उसके लिए बहुत पुराना हो।</string>
|
||||
<string name="apps_search_hint">ऐप खोजें</string>
|
||||
<string name="apps_no_match">“%1$s” से कोई ऐप मेल नहीं खाता।</string>
|
||||
<string name="apps_add_widget">विजेट जोड़ें</string>
|
||||
|
||||
@@ -3332,6 +3332,19 @@
|
||||
<string name="integration_shortcuts_service">DroidDeck Kezdőképernyő gomb</string>
|
||||
<string name="integration_shortcuts_service_description">A Kezdőképernyő gomb lenyomásait továbbítja a Steam Guide-nak, amíg egy Steam-munkamenet van fókuszban, és a DroidDeck az alapértelmezett kezdőképernyő alkalmazás. Nem olvassa a képernyő tartalmát.</string>
|
||||
<string name="integration_brightness_needed">Kapcsolja be a Fényerőt itt: Beállítás → Steam-integráció</string>
|
||||
<string name="setup_gpu_bridge_off">Mali híd: ki</string>
|
||||
<string name="setup_gpu_bridge_on">Mali híd: be</string>
|
||||
<string name="setup_gpu_bridge_detail">A(z) %1$s nem Adreno. A kísérleti Vulkan híd be van kapcsolva: a munkamenet a telefon saját illesztőprogramján keresztül rajzol. Hibákra számíts; küldd el a munkamenet naplóit.</string>
|
||||
<string name="setup_bridge_safe">Biztonságos mód</string>
|
||||
<string name="setup_bridge_safe_on">Biztonságos mód: be</string>
|
||||
<string name="setup_bridge_safe_off">Biztonságos mód: ki</string>
|
||||
<string name="setup_bridge_safe_on_detail">A legjobb kompatibilitás. Új eszközhöz ajánlott.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Gyorsabb ott, ahol ez a GPU átment az ellenőrzéseken.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automatikus</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: a Protoné</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Régebbi DXVK-t használ, ha ennek a GPU-nak a Vulkanja túl régi a Proton sajátjához.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Minden Proton megtartja a saját DXVK-ját, akkor is, ha ennek a GPU-nak a Vulkanja túl régi lehet hozzá.</string>
|
||||
<string name="apps_search_hint">Alkalmazások keresése</string>
|
||||
<string name="apps_no_match">Egy alkalmazás sem felel meg ennek: „%1$s”.</string>
|
||||
<string name="apps_add_widget">Modul hozzáadása</string>
|
||||
|
||||
@@ -3305,6 +3305,19 @@
|
||||
<string name="integration_shortcuts_service">Tombol Home DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Meneruskan tekanan tombol Home ke Steam Guide saat sesi Steam sedang aktif dan DroidDeck adalah aplikasi Beranda default. Tidak membaca konten layar.</string>
|
||||
<string name="integration_brightness_needed">Aktifkan Kecerahan di Penyiapan → Integrasi Steam</string>
|
||||
<string name="setup_gpu_bridge_off">Jembatan Mali: mati</string>
|
||||
<string name="setup_gpu_bridge_on">Jembatan Mali: nyala</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s bukan Adreno. Jembatan Vulkan eksperimental menyala: sesi menggambar melalui driver ponsel itu sendiri. Bersiaplah menemui bug; kirim log sesi.</string>
|
||||
<string name="setup_bridge_safe">Mode aman</string>
|
||||
<string name="setup_bridge_safe_on">Mode aman: nyala</string>
|
||||
<string name="setup_bridge_safe_off">Mode aman: mati</string>
|
||||
<string name="setup_bridge_safe_on_detail">Paling kompatibel. Disarankan untuk perangkat baru.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Lebih cepat di bagian yang lolos pemeriksaan GPU ini.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: otomatis</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: bawaan Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Memakai DXVK lebih lama jika Vulkan GPU ini terlalu lama untuk DXVK bawaan Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Setiap Proton tetap memakai DXVK bawaannya, meski Vulkan GPU ini mungkin terlalu lama untuknya.</string>
|
||||
<string name="apps_search_hint">Cari aplikasi</string>
|
||||
<string name="apps_no_match">Tidak ada aplikasi yang cocok dengan “%1$s”.</string>
|
||||
<string name="apps_add_widget">Tambahkan widget</string>
|
||||
|
||||
@@ -3368,6 +3368,19 @@
|
||||
<string name="integration_shortcuts_service">Tasto Home di DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Inoltra le pressioni del tasto Home a Steam Guide mentre una sessione Steam è in primo piano e DroidDeck è l\'app Home predefinita. Non legge il contenuto dello schermo.</string>
|
||||
<string name="integration_brightness_needed">Attiva Luminosità in Configurazione → Integrazione con Steam</string>
|
||||
<string name="setup_gpu_bridge_off">Ponte Mali: disattivato</string>
|
||||
<string name="setup_gpu_bridge_on">Ponte Mali: attivo</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s non è una Adreno. Il ponte Vulkan sperimentale è attivo: la sessione disegna tramite il driver del telefono. Aspettati bug; invia i log della sessione.</string>
|
||||
<string name="setup_bridge_safe">Modalità sicura</string>
|
||||
<string name="setup_bridge_safe_on">Modalità sicura: attiva</string>
|
||||
<string name="setup_bridge_safe_off">Modalità sicura: disattivata</string>
|
||||
<string name="setup_bridge_safe_on_detail">La più compatibile. Consigliata per un nuovo dispositivo.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Più veloce dove questa GPU ha superato i controlli.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automatico</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: quello di Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Usa un DXVK più vecchio se il Vulkan di questa GPU è troppo vecchio per quello di Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Ogni Proton mantiene il proprio DXVK, anche se il Vulkan di questa GPU potrebbe essere troppo vecchio.</string>
|
||||
<string name="apps_search_hint">Cerca app</string>
|
||||
<string name="apps_no_match">Nessuna app corrisponde a «%1$s».</string>
|
||||
<string name="apps_add_widget">Aggiungi widget</string>
|
||||
|
||||
@@ -3250,6 +3250,19 @@
|
||||
<string name="integration_shortcuts_service">DroidDeckホームボタン</string>
|
||||
<string name="integration_shortcuts_service_description">Steamセッションがフォーカスされ、DroidDeckがデフォルトのホームアプリの場合に、ホームボタンの操作をSteamガイドに渡します。画面のコンテンツは読み取りません。</string>
|
||||
<string name="integration_brightness_needed">「セットアップ」→「Steam連携」で明るさをオンにしてください</string>
|
||||
<string name="setup_gpu_bridge_off">Mali ブリッジ: オフ</string>
|
||||
<string name="setup_gpu_bridge_on">Mali ブリッジ: オン</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s は Adreno ではありません。試験的な Vulkan ブリッジがオンです。セッションはスマートフォン本体のドライバーで描画します。不具合が出る可能性があります。セッションログを送ってください。</string>
|
||||
<string name="setup_bridge_safe">セーフモード</string>
|
||||
<string name="setup_bridge_safe_on">セーフモード: オン</string>
|
||||
<string name="setup_bridge_safe_off">セーフモード: オフ</string>
|
||||
<string name="setup_bridge_safe_on_detail">最も互換性が高い設定です。新しいデバイスにおすすめです。</string>
|
||||
<string name="setup_bridge_safe_off_detail">この GPU がチェックに合格した部分で高速になります。</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: 自動</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: Proton 付属</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">この GPU の Vulkan が Proton 付属の DXVK には古すぎる場合、古い DXVK を使います。</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">この GPU の Vulkan が古すぎる場合でも、各 Proton は付属の DXVK を使い続けます。</string>
|
||||
<string name="apps_search_hint">アプリを検索</string>
|
||||
<string name="apps_no_match">「%1$s」に一致するアプリはありません。</string>
|
||||
<string name="apps_add_widget">ウィジェットを追加</string>
|
||||
|
||||
@@ -3305,6 +3305,19 @@
|
||||
<string name="integration_shortcuts_service">DroidDeck 홈 버튼</string>
|
||||
<string name="integration_shortcuts_service_description">Steam 세션에 포커스가 있고 DroidDeck이 기본 홈 앱일 때 홈 버튼 입력을 Steam Guide로 전달합니다. 화면 콘텐츠는 읽지 않습니다.</string>
|
||||
<string name="integration_brightness_needed">설정 → Steam 연동에서 밝기를 켜세요</string>
|
||||
<string name="setup_gpu_bridge_off">Mali 브리지: 끔</string>
|
||||
<string name="setup_gpu_bridge_on">Mali 브리지: 켬</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s은(는) Adreno가 아닙니다. 실험적 Vulkan 브리지가 켜져 있어 세션이 휴대폰 자체 드라이버로 그립니다. 버그가 있을 수 있으니 세션 로그를 보내 주세요.</string>
|
||||
<string name="setup_bridge_safe">안전 모드</string>
|
||||
<string name="setup_bridge_safe_on">안전 모드: 켬</string>
|
||||
<string name="setup_bridge_safe_off">안전 모드: 끔</string>
|
||||
<string name="setup_bridge_safe_on_detail">호환성이 가장 높습니다. 새 기기에 권장합니다.</string>
|
||||
<string name="setup_bridge_safe_off_detail">이 GPU가 검사를 통과한 부분에서 더 빠릅니다.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: 자동</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: Proton 기본</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">이 GPU의 Vulkan이 Proton 기본 DXVK에 너무 오래된 경우 이전 DXVK를 사용합니다.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">이 GPU의 Vulkan이 너무 오래되었을 수 있어도 각 Proton은 자체 DXVK를 유지합니다.</string>
|
||||
<string name="apps_search_hint">앱 검색</string>
|
||||
<string name="apps_no_match">‘%1$s’와(과) 일치하는 앱이 없습니다.</string>
|
||||
<string name="apps_add_widget">위젯 추가</string>
|
||||
|
||||
@@ -3305,6 +3305,19 @@
|
||||
<string name="integration_shortcuts_service">Butang Laman Utama DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Menghantar tekanan butang Laman Utama kepada Steam Guide semasa sesi Steam difokuskan dan DroidDeck ialah apl Laman Utama lalai. Tidak membaca kandungan skrin.</string>
|
||||
<string name="integration_brightness_needed">Hidupkan Kecerahan dalam Persediaan → Integrasi Steam</string>
|
||||
<string name="setup_gpu_bridge_off">Jambatan Mali: mati</string>
|
||||
<string name="setup_gpu_bridge_on">Jambatan Mali: hidup</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s bukan Adreno. Jambatan Vulkan eksperimen dihidupkan: sesi melukis melalui pemacu telefon itu sendiri. Jangkakan pepijat; hantar log sesi.</string>
|
||||
<string name="setup_bridge_safe">Mod selamat</string>
|
||||
<string name="setup_bridge_safe_on">Mod selamat: hidup</string>
|
||||
<string name="setup_bridge_safe_off">Mod selamat: mati</string>
|
||||
<string name="setup_bridge_safe_on_detail">Paling serasi. Disyorkan untuk peranti baharu.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Lebih pantas di bahagian yang lulus semakan GPU ini.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automatik</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: milik Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Menggunakan DXVK yang lebih lama jika Vulkan GPU ini terlalu lama untuk DXVK Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Setiap Proton mengekalkan DXVK sendiri, walaupun Vulkan GPU ini mungkin terlalu lama untuknya.</string>
|
||||
<string name="apps_search_hint">Cari apl</string>
|
||||
<string name="apps_no_match">Tiada apl sepadan dengan “%1$s”.</string>
|
||||
<string name="apps_add_widget">Tambah widget</string>
|
||||
|
||||
@@ -3332,6 +3332,19 @@
|
||||
<string name="integration_shortcuts_service">DroidDeck Hjem-knapp</string>
|
||||
<string name="integration_shortcuts_service_description">Sender trykk på Hjem-knappen til Steam Guide mens en Steam-sesjon er i fokus og DroidDeck er standard startskjerm-app. Leser ikke skjerminnhold.</string>
|
||||
<string name="integration_brightness_needed">Slå på Lysstyrke i Oppsett → Steam-integrering</string>
|
||||
<string name="setup_gpu_bridge_off">Mali-bro: av</string>
|
||||
<string name="setup_gpu_bridge_on">Mali-bro: på</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s er ikke en Adreno. Den eksperimentelle Vulkan-broen er på: økten tegner gjennom telefonens egen driver. Forvent feil; send øktloggene.</string>
|
||||
<string name="setup_bridge_safe">Sikker modus</string>
|
||||
<string name="setup_bridge_safe_on">Sikker modus: på</string>
|
||||
<string name="setup_bridge_safe_off">Sikker modus: av</string>
|
||||
<string name="setup_bridge_safe_on_detail">Mest kompatibel. Anbefales for en ny enhet.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Raskere der denne GPU-en besto kontrollene sine.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automatisk</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: Protons egen</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Bruker en eldre DXVK der denne GPU-ens Vulkan er for gammel for Protons.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Hver Proton beholder sin egen DXVK, selv der denne GPU-ens Vulkan kan være for gammel for den.</string>
|
||||
<string name="apps_search_hint">Søk i apper</string>
|
||||
<string name="apps_no_match">Ingen apper samsvarer med «%1$s».</string>
|
||||
<string name="apps_add_widget">Legg til modul</string>
|
||||
|
||||
@@ -3332,6 +3332,19 @@
|
||||
<string name="integration_shortcuts_service">DroidDeck-startknop</string>
|
||||
<string name="integration_shortcuts_service_description">Geeft drukken op de startknop door aan Steam Guide terwijl een Steam-sessie actief is en DroidDeck de standaard startscherm-app is. Leest geen scherminhoud.</string>
|
||||
<string name="integration_brightness_needed">Zet Helderheid aan in Installatie → Steam-integratie</string>
|
||||
<string name="setup_gpu_bridge_off">Mali-brug: uit</string>
|
||||
<string name="setup_gpu_bridge_on">Mali-brug: aan</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s is geen Adreno. De experimentele Vulkan-brug staat aan: de sessie tekent via het eigen stuurprogramma van de telefoon. Verwacht fouten; stuur de sessielogboeken.</string>
|
||||
<string name="setup_bridge_safe">Veilige modus</string>
|
||||
<string name="setup_bridge_safe_on">Veilige modus: aan</string>
|
||||
<string name="setup_bridge_safe_off">Veilige modus: uit</string>
|
||||
<string name="setup_bridge_safe_on_detail">Meest compatibel. Aanbevolen voor een nieuw apparaat.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Sneller waar deze GPU zijn controles heeft doorstaan.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automatisch</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: die van Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Gebruikt een oudere DXVK als de Vulkan van deze GPU te oud is voor die van Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Elke Proton houdt zijn eigen DXVK, ook als de Vulkan van deze GPU daarvoor te oud kan zijn.</string>
|
||||
<string name="apps_search_hint">Apps zoeken</string>
|
||||
<string name="apps_no_match">Geen apps gevonden voor ‘%1$s’.</string>
|
||||
<string name="apps_add_widget">Widget toevoegen</string>
|
||||
|
||||
@@ -3404,6 +3404,19 @@
|
||||
<string name="integration_shortcuts_service">Przycisk ekranu głównego DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Przekazuje naciśnięcia przycisku ekranu głównego do Steam Guide, gdy aktywna jest sesja Steam, a DroidDeck jest domyślną aplikacją ekranu głównego. Nie odczytuje zawartości ekranu.</string>
|
||||
<string name="integration_brightness_needed">Włącz Jasność w Konfiguracja → Integracja ze Steam</string>
|
||||
<string name="setup_gpu_bridge_off">Most Mali: wył.</string>
|
||||
<string name="setup_gpu_bridge_on">Most Mali: wł.</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s to nie Adreno. Eksperymentalny most Vulkan jest włączony: sesja rysuje przez własny sterownik telefonu. Spodziewaj się błędów; wyślij logi sesji.</string>
|
||||
<string name="setup_bridge_safe">Tryb bezpieczny</string>
|
||||
<string name="setup_bridge_safe_on">Tryb bezpieczny: wł.</string>
|
||||
<string name="setup_bridge_safe_off">Tryb bezpieczny: wył.</string>
|
||||
<string name="setup_bridge_safe_on_detail">Największa zgodność. Zalecany dla nowego urządzenia.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Szybciej tam, gdzie ten GPU przeszedł testy.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automatycznie</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: z Protona</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Używa starszego DXVK, gdy Vulkan tego GPU jest za stary dla DXVK z Protona.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Każdy Proton zachowuje własny DXVK, nawet jeśli Vulkan tego GPU może być dla niego za stary.</string>
|
||||
<string name="apps_search_hint">Szukaj aplikacji</string>
|
||||
<string name="apps_no_match">Żadna aplikacja nie pasuje do „%1$s”.</string>
|
||||
<string name="apps_add_widget">Dodaj widżet</string>
|
||||
|
||||
@@ -3368,6 +3368,19 @@
|
||||
<string name="integration_shortcuts_service">Botão Página inicial do DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Envia os toques no botão Página inicial para o Guide do Steam enquanto uma sessão do Steam está em foco e o DroidDeck é a app de página inicial predefinida. Não lê o conteúdo do ecrã.</string>
|
||||
<string name="integration_brightness_needed">Ative Brilho em Configuração → Integração com o Steam</string>
|
||||
<string name="setup_gpu_bridge_off">Ponte Mali: desligada</string>
|
||||
<string name="setup_gpu_bridge_on">Ponte Mali: ligada</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s não é uma Adreno. A ponte Vulkan experimental está ligada: a sessão desenha através do próprio controlador do telemóvel. Conte com erros; envie os registos da sessão.</string>
|
||||
<string name="setup_bridge_safe">Modo seguro</string>
|
||||
<string name="setup_bridge_safe_on">Modo seguro: ligado</string>
|
||||
<string name="setup_bridge_safe_off">Modo seguro: desligado</string>
|
||||
<string name="setup_bridge_safe_on_detail">O mais compatível. Recomendado para um dispositivo novo.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Mais rápido onde esta GPU passou nas verificações.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automático</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: o do Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Usa um DXVK mais antigo quando o Vulkan desta GPU é demasiado antigo para o do Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Cada Proton mantém o seu próprio DXVK, mesmo quando o Vulkan desta GPU pode ser demasiado antigo para ele.</string>
|
||||
<string name="apps_search_hint">Pesquisar aplicações</string>
|
||||
<string name="apps_no_match">Nenhuma aplicação corresponde a “%1$s”.</string>
|
||||
<string name="apps_add_widget">Adicionar widget</string>
|
||||
|
||||
@@ -3368,6 +3368,19 @@
|
||||
<string name="integration_shortcuts_service">Botão Início do DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Repassa os toques no botão Início para o Guide da Steam enquanto uma sessão da Steam está em foco e o DroidDeck é o app de tela inicial padrão. Não lê o conteúdo da tela.</string>
|
||||
<string name="integration_brightness_needed">Ative Brilho em Configuração → Integração com a Steam</string>
|
||||
<string name="setup_gpu_bridge_off">Ponte Mali: desligada</string>
|
||||
<string name="setup_gpu_bridge_on">Ponte Mali: ligada</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s não é uma Adreno. A ponte Vulkan experimental está ligada: a sessão desenha pelo próprio driver do celular. Espere bugs; envie os logs da sessão.</string>
|
||||
<string name="setup_bridge_safe">Modo seguro</string>
|
||||
<string name="setup_bridge_safe_on">Modo seguro: ligado</string>
|
||||
<string name="setup_bridge_safe_off">Modo seguro: desligado</string>
|
||||
<string name="setup_bridge_safe_on_detail">O mais compatível. Recomendado para um dispositivo novo.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Mais rápido onde esta GPU passou nas verificações.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automático</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: o do Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Usa um DXVK mais antigo quando o Vulkan desta GPU é antigo demais para o do Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Cada Proton mantém o próprio DXVK, mesmo quando o Vulkan desta GPU pode ser antigo demais para ele.</string>
|
||||
<string name="apps_search_hint">Pesquisar apps</string>
|
||||
<string name="apps_no_match">Nenhum app corresponde a “%1$s”.</string>
|
||||
<string name="apps_add_widget">Adicionar widget</string>
|
||||
|
||||
@@ -3368,6 +3368,19 @@
|
||||
<string name="integration_shortcuts_service">Butonul Acasă DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Transmite apăsările butonului Acasă către Steam Guide cât timp o sesiune Steam este activă și DroidDeck este aplicația Acasă implicită. Nu citește conținutul ecranului.</string>
|
||||
<string name="integration_brightness_needed">Activează Luminozitate în Configurare → Integrare Steam</string>
|
||||
<string name="setup_gpu_bridge_off">Punte Mali: oprită</string>
|
||||
<string name="setup_gpu_bridge_on">Punte Mali: pornită</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s nu este Adreno. Puntea Vulkan experimentală este pornită: sesiunea desenează prin driverul propriu al telefonului. Așteaptă-te la erori; trimite jurnalele sesiunii.</string>
|
||||
<string name="setup_bridge_safe">Mod sigur</string>
|
||||
<string name="setup_bridge_safe_on">Mod sigur: pornit</string>
|
||||
<string name="setup_bridge_safe_off">Mod sigur: oprit</string>
|
||||
<string name="setup_bridge_safe_on_detail">Cel mai compatibil. Recomandat pentru un dispozitiv nou.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Mai rapid acolo unde acest GPU a trecut verificările.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automat</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: al Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Folosește un DXVK mai vechi când Vulkan-ul acestui GPU este prea vechi pentru cel din Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Fiecare Proton își păstrează propriul DXVK, chiar dacă Vulkan-ul acestui GPU poate fi prea vechi pentru el.</string>
|
||||
<string name="apps_search_hint">Caută aplicații</string>
|
||||
<string name="apps_no_match">Nicio aplicație nu se potrivește cu „%1$s”.</string>
|
||||
<string name="apps_add_widget">Adaugă widget</string>
|
||||
|
||||
@@ -3404,6 +3404,19 @@
|
||||
<string name="integration_shortcuts_service">Кнопка «Домой» DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Передаёт нажатия кнопки «Домой» в Steam Guide, пока активна сессия Steam и DroidDeck является главным экраном по умолчанию. Не считывает содержимое экрана.</string>
|
||||
<string name="integration_brightness_needed">Включите «Яркость» в «Настройка → Интеграция со Steam»</string>
|
||||
<string name="setup_gpu_bridge_off">Мост Mali: выкл.</string>
|
||||
<string name="setup_gpu_bridge_on">Мост Mali: вкл.</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s — не Adreno. Включён экспериментальный мост Vulkan: сеанс рисует через собственный драйвер телефона. Возможны ошибки; отправьте журналы сеанса.</string>
|
||||
<string name="setup_bridge_safe">Безопасный режим</string>
|
||||
<string name="setup_bridge_safe_on">Безопасный режим: вкл.</string>
|
||||
<string name="setup_bridge_safe_off">Безопасный режим: выкл.</string>
|
||||
<string name="setup_bridge_safe_on_detail">Максимальная совместимость. Рекомендуется для нового устройства.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Быстрее там, где этот GPU прошёл проверки.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: автоматически</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: из Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Использует более старый DXVK, если Vulkan этого GPU слишком стар для DXVK из Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Каждый Proton оставляет свой DXVK, даже если Vulkan этого GPU может быть для него слишком старым.</string>
|
||||
<string name="apps_search_hint">Поиск приложений</string>
|
||||
<string name="apps_no_match">Нет приложений по запросу «%1$s».</string>
|
||||
<string name="apps_add_widget">Добавить виджет</string>
|
||||
|
||||
@@ -3332,6 +3332,19 @@
|
||||
<string name="integration_shortcuts_service">DroidDeck hemknapp</string>
|
||||
<string name="integration_shortcuts_service_description">Skickar tryck på hemknappen till Steam Guide medan en Steam-session är i fokus och DroidDeck är standardappen för startskärmen. Läser inte skärminnehåll.</string>
|
||||
<string name="integration_brightness_needed">Slå på Ljusstyrka under Konfiguration → Steam-integration</string>
|
||||
<string name="setup_gpu_bridge_off">Mali-brygga: av</string>
|
||||
<string name="setup_gpu_bridge_on">Mali-brygga: på</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s är inte en Adreno. Den experimentella Vulkan-bryggan är på: sessionen ritar via telefonens egen drivrutin. Räkna med buggar; skicka sessionsloggarna.</string>
|
||||
<string name="setup_bridge_safe">Säkert läge</string>
|
||||
<string name="setup_bridge_safe_on">Säkert läge: på</string>
|
||||
<string name="setup_bridge_safe_off">Säkert läge: av</string>
|
||||
<string name="setup_bridge_safe_on_detail">Mest kompatibelt. Rekommenderas för en ny enhet.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Snabbare där den här GPU:n klarade sina kontroller.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automatiskt</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: Protons egen</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Använder en äldre DXVK när den här GPU:ns Vulkan är för gammal för Protons.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Varje Proton behåller sin egen DXVK, även där den här GPU:ns Vulkan kan vara för gammal för den.</string>
|
||||
<string name="apps_search_hint">Sök appar</string>
|
||||
<string name="apps_no_match">Inga appar matchar ”%1$s”.</string>
|
||||
<string name="apps_add_widget">Lägg till widget</string>
|
||||
|
||||
@@ -3305,6 +3305,19 @@
|
||||
<string name="integration_shortcuts_service">ปุ่มหน้าหลัก DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">ส่งการกดปุ่มหน้าหลักไปยัง Steam Guide ขณะเซสชัน Steam อยู่ในโฟกัสและ DroidDeck เป็นแอปหน้าหลักเริ่มต้น ไม่อ่านเนื้อหาบนหน้าจอ</string>
|
||||
<string name="integration_brightness_needed">เปิดความสว่างในการตั้งค่า → การผสานรวม Steam</string>
|
||||
<string name="setup_gpu_bridge_off">บริดจ์ Mali: ปิด</string>
|
||||
<string name="setup_gpu_bridge_on">บริดจ์ Mali: เปิด</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s ไม่ใช่ Adreno บริดจ์ Vulkan รุ่นทดลองเปิดอยู่: เซสชันวาดผ่านไดรเวอร์ของโทรศัพท์เอง อาจพบบั๊ก โปรดส่งบันทึกของเซสชัน</string>
|
||||
<string name="setup_bridge_safe">โหมดปลอดภัย</string>
|
||||
<string name="setup_bridge_safe_on">โหมดปลอดภัย: เปิด</string>
|
||||
<string name="setup_bridge_safe_off">โหมดปลอดภัย: ปิด</string>
|
||||
<string name="setup_bridge_safe_on_detail">เข้ากันได้มากที่สุด แนะนำสำหรับอุปกรณ์ใหม่</string>
|
||||
<string name="setup_bridge_safe_off_detail">เร็วขึ้นในส่วนที่ GPU นี้ผ่านการตรวจสอบ</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: อัตโนมัติ</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: ของ Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">ใช้ DXVK รุ่นเก่ากว่าเมื่อ Vulkan ของ GPU นี้เก่าเกินไปสำหรับ DXVK ของ Proton</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Proton แต่ละตัวใช้ DXVK ของตัวเอง แม้ Vulkan ของ GPU นี้อาจเก่าเกินไปสำหรับมัน</string>
|
||||
<string name="apps_search_hint">ค้นหาแอป</string>
|
||||
<string name="apps_no_match">ไม่มีแอปที่ตรงกับ “%1$s”</string>
|
||||
<string name="apps_add_widget">เพิ่มวิดเจ็ต</string>
|
||||
|
||||
@@ -3332,6 +3332,19 @@
|
||||
<string name="integration_shortcuts_service">DroidDeck Ana ekran düğmesi</string>
|
||||
<string name="integration_shortcuts_service_description">Bir Steam oturumu odaktayken ve DroidDeck varsayılan Ana ekran uygulamasıyken Ana ekran düğmesine basışları Steam Guide\'a iletir. Ekran içeriğini okumaz.</string>
|
||||
<string name="integration_brightness_needed">Kurulum → Steam entegrasyonu bölümünde Parlaklık\'ı açın</string>
|
||||
<string name="setup_gpu_bridge_off">Mali köprüsü: kapalı</string>
|
||||
<string name="setup_gpu_bridge_on">Mali köprüsü: açık</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s bir Adreno değil. Deneysel Vulkan köprüsü açık: oturum, telefonun kendi sürücüsü üzerinden çizer. Hatalar olabilir; oturum günlüklerini gönderin.</string>
|
||||
<string name="setup_bridge_safe">Güvenli mod</string>
|
||||
<string name="setup_bridge_safe_on">Güvenli mod: açık</string>
|
||||
<string name="setup_bridge_safe_off">Güvenli mod: kapalı</string>
|
||||
<string name="setup_bridge_safe_on_detail">En uyumlu. Yeni bir cihaz için önerilir.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Bu GPU\'nun kontrollerini geçtiği yerlerde daha hızlı.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: otomatik</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: Proton\'unki</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Bu GPU\'nun Vulkan\'ı Proton\'un DXVK\'sı için çok eskiyse daha eski bir DXVK kullanır.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Bu GPU\'nun Vulkan\'ı onun için çok eski olsa bile her Proton kendi DXVK\'sını korur.</string>
|
||||
<string name="apps_search_hint">Uygulama ara</string>
|
||||
<string name="apps_no_match">“%1$s” ile eşleşen uygulama yok.</string>
|
||||
<string name="apps_add_widget">Widget ekle</string>
|
||||
|
||||
@@ -3404,6 +3404,19 @@
|
||||
<string name="integration_shortcuts_service">Кнопка «Додому» DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Передає натискання кнопки «Додому» в Steam Guide, поки активний сеанс Steam і DroidDeck є типовим головним екраном. Не зчитує вміст екрана.</string>
|
||||
<string name="integration_brightness_needed">Увімкніть «Яскравість» у «Налаштування → Інтеграція зі Steam»</string>
|
||||
<string name="setup_gpu_bridge_off">Міст Mali: вимк.</string>
|
||||
<string name="setup_gpu_bridge_on">Міст Mali: увімк.</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s — не Adreno. Увімкнено експериментальний міст Vulkan: сеанс малює через власний драйвер телефона. Можливі помилки; надішліть журнали сеансу.</string>
|
||||
<string name="setup_bridge_safe">Безпечний режим</string>
|
||||
<string name="setup_bridge_safe_on">Безпечний режим: увімк.</string>
|
||||
<string name="setup_bridge_safe_off">Безпечний режим: вимк.</string>
|
||||
<string name="setup_bridge_safe_on_detail">Найкраща сумісність. Рекомендовано для нового пристрою.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Швидше там, де цей GPU пройшов перевірки.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: автоматично</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: з Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Використовує старіший DXVK, якщо Vulkan цього GPU застарий для DXVK з Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Кожен Proton залишає свій DXVK, навіть якщо Vulkan цього GPU може бути для нього застарим.</string>
|
||||
<string name="apps_search_hint">Пошук застосунків</string>
|
||||
<string name="apps_no_match">Немає застосунків за запитом «%1$s».</string>
|
||||
<string name="apps_add_widget">Додати віджет</string>
|
||||
|
||||
@@ -3305,6 +3305,19 @@
|
||||
<string name="integration_shortcuts_service">Nút Home DroidDeck</string>
|
||||
<string name="integration_shortcuts_service_description">Chuyển các lần nhấn nút Home đến Steam Guide khi phiên Steam đang được chọn và DroidDeck là ứng dụng màn hình chính mặc định. Không đọc nội dung màn hình.</string>
|
||||
<string name="integration_brightness_needed">Bật Độ sáng trong Thiết lập → Tích hợp Steam</string>
|
||||
<string name="setup_gpu_bridge_off">Cầu Mali: tắt</string>
|
||||
<string name="setup_gpu_bridge_on">Cầu Mali: bật</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s không phải Adreno. Cầu Vulkan thử nghiệm đang bật: phiên vẽ qua trình điều khiển của chính điện thoại. Có thể gặp lỗi; hãy gửi nhật ký phiên.</string>
|
||||
<string name="setup_bridge_safe">Chế độ an toàn</string>
|
||||
<string name="setup_bridge_safe_on">Chế độ an toàn: bật</string>
|
||||
<string name="setup_bridge_safe_off">Chế độ an toàn: tắt</string>
|
||||
<string name="setup_bridge_safe_on_detail">Tương thích nhất. Nên dùng cho thiết bị mới.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Nhanh hơn ở những chỗ GPU này đã vượt qua kiểm tra.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: tự động</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: của Proton</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Dùng DXVK cũ hơn khi Vulkan của GPU này quá cũ cho DXVK của Proton.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Mỗi Proton giữ DXVK riêng, kể cả khi Vulkan của GPU này có thể quá cũ cho nó.</string>
|
||||
<string name="apps_search_hint">Tìm ứng dụng</string>
|
||||
<string name="apps_no_match">Không có ứng dụng nào khớp với “%1$s”.</string>
|
||||
<string name="apps_add_widget">Thêm tiện ích</string>
|
||||
|
||||
@@ -3251,6 +3251,19 @@
|
||||
<string name="integration_shortcuts_service">DroidDeck 主屏幕按钮</string>
|
||||
<string name="integration_shortcuts_service_description">当 Steam 会话处于焦点且 DroidDeck 为默认主屏幕应用时,将主屏幕按钮的按下操作传递给 Steam Guide 按钮。不会读取屏幕内容。</string>
|
||||
<string name="integration_brightness_needed">请在“配置”→“Steam 集成”中开启亮度</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK:自动</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK:Proton 自带</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">此 GPU 的 Vulkan 版本对 Proton 自带的 DXVK 来说太旧时,改用较旧的 DXVK。</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">每个 Proton 都使用自带的 DXVK,即使此 GPU 的 Vulkan 版本可能太旧。</string>
|
||||
<string name="setup_gpu_bridge_off">Mali 桥接:关</string>
|
||||
<string name="setup_gpu_bridge_on">Mali 桥接:开</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s 不是 Adreno。实验性 Vulkan 桥接已开启:会话通过手机自带的驱动绘制。可能会有问题,请发送会话日志。</string>
|
||||
<string name="setup_bridge_safe">安全模式</string>
|
||||
<string name="setup_bridge_safe_on">安全模式:开</string>
|
||||
<string name="setup_bridge_safe_off">安全模式:关</string>
|
||||
<string name="setup_bridge_safe_on_detail">兼容性最好。推荐新设备使用。</string>
|
||||
<string name="setup_bridge_safe_off_detail">在此 GPU 通过检查的地方更快。</string>
|
||||
<string name="apps_search_hint">搜索应用</string>
|
||||
<string name="apps_no_match">没有与“%1$s”匹配的应用。</string>
|
||||
<string name="apps_add_widget">添加微件</string>
|
||||
|
||||
@@ -3251,6 +3251,19 @@
|
||||
<string name="integration_shortcuts_service">DroidDeck 主畫面按鈕</string>
|
||||
<string name="integration_shortcuts_service_description">當 Steam 會話處於焦點且 DroidDeck 為預設主畫面應用程式時,將主畫面按鈕的按壓傳送給 Steam Guide。不會讀取螢幕內容。</string>
|
||||
<string name="integration_brightness_needed">請在「初始設定 → Steam 整合」中開啟「亮度」</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK:自動</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK:Proton 內建</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">此 GPU 的 Vulkan 版本對 Proton 內建的 DXVK 來說太舊時,改用較舊的 DXVK。</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">每個 Proton 都使用內建的 DXVK,即使此 GPU 的 Vulkan 版本可能太舊。</string>
|
||||
<string name="setup_gpu_bridge_off">Mali 橋接:關</string>
|
||||
<string name="setup_gpu_bridge_on">Mali 橋接:開</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s 不是 Adreno。實驗性 Vulkan 橋接已開啟:工作階段透過手機內建的驅動程式繪製。可能會有問題,請傳送工作階段記錄。</string>
|
||||
<string name="setup_bridge_safe">安全模式</string>
|
||||
<string name="setup_bridge_safe_on">安全模式:開</string>
|
||||
<string name="setup_bridge_safe_off">安全模式:關</string>
|
||||
<string name="setup_bridge_safe_on_detail">相容性最好。建議新裝置使用。</string>
|
||||
<string name="setup_bridge_safe_off_detail">在此 GPU 通過檢查的地方較快。</string>
|
||||
<string name="apps_search_hint">搜尋應用程式</string>
|
||||
<string name="apps_no_match">沒有符合「%1$s」的應用程式。</string>
|
||||
<string name="apps_add_widget">新增小工具</string>
|
||||
|
||||
@@ -3251,6 +3251,19 @@
|
||||
<string name="integration_shortcuts_service">DroidDeck 主畫面按鈕</string>
|
||||
<string name="integration_shortcuts_service_description">當 Steam 工作階段處於焦點且 DroidDeck 為預設主畫面應用程式時,將主畫面按鈕的按壓傳送給 Steam Guide。不會讀取螢幕內容。</string>
|
||||
<string name="integration_brightness_needed">請在「初始設定 → Steam 整合」中開啟「亮度」</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK:自動</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK:Proton 內建</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">此 GPU 的 Vulkan 版本對 Proton 內建的 DXVK 來說太舊時,改用較舊的 DXVK。</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">每個 Proton 都使用內建的 DXVK,即使此 GPU 的 Vulkan 版本可能太舊。</string>
|
||||
<string name="setup_gpu_bridge_off">Mali 橋接:關</string>
|
||||
<string name="setup_gpu_bridge_on">Mali 橋接:開</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s 不是 Adreno。實驗性 Vulkan 橋接已開啟:工作階段透過手機內建的驅動程式繪製。可能會有問題,請傳送工作階段記錄。</string>
|
||||
<string name="setup_bridge_safe">安全模式</string>
|
||||
<string name="setup_bridge_safe_on">安全模式:開</string>
|
||||
<string name="setup_bridge_safe_off">安全模式:關</string>
|
||||
<string name="setup_bridge_safe_on_detail">相容性最好。建議新裝置使用。</string>
|
||||
<string name="setup_bridge_safe_off_detail">在此 GPU 通過檢查的地方較快。</string>
|
||||
<string name="apps_search_hint">搜尋應用程式</string>
|
||||
<string name="apps_no_match">沒有符合「%1$s」的應用程式。</string>
|
||||
<string name="apps_add_widget">新增小工具</string>
|
||||
|
||||
@@ -3405,6 +3405,19 @@
|
||||
<string name="stores_xbox_cloud_settings">Cloud settings</string>
|
||||
<string name="xbox_cloud_gaming" translatable="false">Xbox Cloud Gaming</string>
|
||||
<string name="xbox_filter_game_pass" translatable="false">Game Pass</string>
|
||||
<string name="setup_gpu_bridge_off">Mali bridge: off</string>
|
||||
<string name="setup_gpu_bridge_on">Mali bridge: on</string>
|
||||
<string name="setup_bridge_safe">Safe mode</string>
|
||||
<string name="setup_bridge_safe_on">Safe mode: on</string>
|
||||
<string name="setup_bridge_safe_off">Safe mode: off</string>
|
||||
<string name="setup_bridge_safe_on_detail">Most compatible. Recommended for a new device.</string>
|
||||
<string name="setup_bridge_safe_off_detail">Faster where this GPU passed its checks.</string>
|
||||
<string name="setup_bridge_dxvk">DXVK</string>
|
||||
<string name="setup_bridge_dxvk_auto">DXVK: automatic</string>
|
||||
<string name="setup_bridge_dxvk_proton">DXVK: Proton\'s own</string>
|
||||
<string name="setup_bridge_dxvk_auto_detail">Uses an older DXVK where this GPU\'s Vulkan is too old for Proton\'s.</string>
|
||||
<string name="setup_bridge_dxvk_proton_detail">Every Proton keeps its own DXVK, even where this GPU\'s Vulkan may be too old for it.</string>
|
||||
<string name="setup_gpu_bridge_detail">%1$s is not an Adreno. The experimental Vulkan bridge is on: the session draws through the phone\'s own driver. Expect bugs; send the session logs.</string>
|
||||
<string name="integration_title">Steam integration</string>
|
||||
<string name="integration_count">%1$d of %2$d on</string>
|
||||
<string name="integration_set_up">Set up</string>
|
||||
|
||||
@@ -0,0 +1,267 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import com.droiddeck.launcher.gpu.AppVulkan
|
||||
import com.droiddeck.launcher.gpu.GpuInfo
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.github.luben.zstd.ZstdOutputStream
|
||||
import org.apache.commons.compress.archivers.tar.TarArchiveEntry
|
||||
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream
|
||||
import org.json.JSONObject
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.RuntimeEnvironment
|
||||
import org.robolectric.annotation.Config
|
||||
import java.io.File
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [28], manifest = Config.NONE)
|
||||
class BridgeDxvkTest {
|
||||
private val old = ComponentsManager.DXVK_FOR_VULKAN_1_1
|
||||
private val mid = ComponentsManager.DXVK_FOR_VULKAN_1_3_NO_INT64
|
||||
private lateinit var context: Context
|
||||
|
||||
private val g710 = AppVulkan(1, 1, shaderInt64 = false, maxPushConstants = 128, source = "driver")
|
||||
private val promoted = g710.copy(minor = 2, source = "bridge")
|
||||
private val full = AppVulkan(1, 3, shaderInt64 = true, maxPushConstants = 256, source = "driver")
|
||||
private val mali = GpuInfo("Mali-G710", 0, GpuInfo.Family.NOT_ADRENO, "", false)
|
||||
|
||||
@Before fun setUp() {
|
||||
context = RuntimeEnvironment.getApplication()
|
||||
File(context.filesDir, "components").deleteRecursively()
|
||||
LinuxRuntime.rootDir(context).deleteRecursively()
|
||||
}
|
||||
|
||||
@Test fun theNewestDxvkThatStartsIsChosen() {
|
||||
assertEquals(old, ComponentsManager.bridgeDxvk(g710)?.file)
|
||||
assertEquals(old, ComponentsManager.bridgeDxvk(promoted)?.file)
|
||||
assertEquals(mid, ComponentsManager.bridgeDxvk(full.copy(shaderInt64 = false))?.file)
|
||||
assertEquals(mid, ComponentsManager.bridgeDxvk(full.copy(maxPushConstants = 128))?.file)
|
||||
assertNull(ComponentsManager.bridgeDxvk(full))
|
||||
assertNull(ComponentsManager.bridgeDxvk(full.copy(shaderInt64 = null, maxPushConstants = null)))
|
||||
assertNull(ComponentsManager.bridgeDxvk(AppVulkan(1, 0, null, null, "driver")))
|
||||
assertNull(ComponentsManager.bridgeDxvk(null))
|
||||
assertEquals("Dxvk-Linux", ComponentsManager.bridgeDxvk(g710)?.release)
|
||||
assertEquals("dxvk", ComponentsManager.bridgeDxvk(g710)?.comp)
|
||||
}
|
||||
|
||||
@Test fun theDriversLinesAreRead() {
|
||||
val vk = AppVulkan.fromDriver(mapOf("device" to "Mali-G710 MC10", "api" to "1.1.177", "shader_int64" to "no", "max_push_constants" to "128"))
|
||||
assertEquals(g710, vk)
|
||||
assertNull(AppVulkan.fromDriver(mapOf("error" to "no Vulkan device")))
|
||||
assertNull(AppVulkan.fromDriver(mapOf("api" to "garbage")))
|
||||
val older = AppVulkan.fromDriver(mapOf("api" to "1.3.250"))!!
|
||||
assertNull(older.shaderInt64)
|
||||
assertNull(older.maxPushConstants)
|
||||
}
|
||||
|
||||
@Test fun theBridgesFileWinsForItsOwnGpuOnly() {
|
||||
val text = "device=Mali-G710 MC10\napi=1.2.177\ndriver_api=1.1.177\npromotion=on\nshader_int64=0\nmax_push_constants=128\n"
|
||||
val on = promoted.copy(source = "bridge, promoted")
|
||||
assertEquals(on, AppVulkan.fromBridgeFile(text, "Mali-G710 MC10"))
|
||||
assertEquals(on, AppVulkan.fromBridgeFile(text, null))
|
||||
assertEquals(on, AppVulkan.fromBridgeFile(text, "Mali-G710 MC10", "1.1.177"))
|
||||
assertNull(AppVulkan.fromBridgeFile(text, "Mali-G720 Immortalis MC12"))
|
||||
assertNull(AppVulkan.fromBridgeFile("device=x\n", null))
|
||||
}
|
||||
|
||||
@Test fun withoutPromotionOnTheDriversVersionCounts() {
|
||||
val g710File = g710.copy(source = "bridge")
|
||||
val off = "device=Mali-G710 MC10\napi=1.1.177\ndriver_api=1.1.177\npromotion=off\nshader_int64=0\nmax_push_constants=128\n"
|
||||
assertEquals(g710File, AppVulkan.fromBridgeFile(off, "Mali-G710 MC10", "1.1.177"))
|
||||
val old = "device=Mali-G710 MC10\napi=1.3.177\ndriver_api=1.1.177\nshader_int64=0\nmax_push_constants=128\n"
|
||||
assertEquals(g710File, AppVulkan.fromBridgeFile(old, "Mali-G710 MC10"))
|
||||
assertNull(AppVulkan.fromBridgeFile(off, "Mali-G710 MC10", "1.3.212"))
|
||||
}
|
||||
|
||||
@Test fun anAdrenoSessionIsNotTouched() {
|
||||
proton("proton-exp")
|
||||
assertNull(run(g710, bridge = false))
|
||||
}
|
||||
|
||||
@Test fun aShippedDxvk3IsReplacedOnAVulkan11Phone() {
|
||||
proton("proton-exp")
|
||||
proton("ge")
|
||||
val applied = mutableListOf<String>()
|
||||
val result = run(g710, applyAuto = { id, file -> applied += "$id $file"; "swapped $id" })
|
||||
assertEquals(listOf("ge $old", "proton-exp $old"), applied.sorted())
|
||||
assertTrue(result!!.startsWith("Vulkan 1.1, shaderInt64 no, push constants 128 (driver): DXVK $old"))
|
||||
}
|
||||
|
||||
@Test fun thePlayersOwnChoiceIsKept() {
|
||||
proton("proton-exp")
|
||||
writeState("proton-exp", JSONObject().put("file", "dxvk-3.1-linux.wcp").put("protonVersion", "experimental-11"))
|
||||
assertNull(run(g710))
|
||||
assertNull(run(full))
|
||||
}
|
||||
|
||||
@Test fun anAutomaticChoiceFollowsTheDevice() {
|
||||
proton("proton-exp")
|
||||
writeState("proton-exp", JSONObject().put("file", mid).put("protonVersion", "experimental-11").put("auto", true))
|
||||
val applied = mutableListOf<String>()
|
||||
run(g710, applyAuto = { id, file -> applied += "$id $file"; "swapped" })
|
||||
assertEquals(listOf("proton-exp $old"), applied)
|
||||
|
||||
writeState("proton-exp", JSONObject().put("file", old).put("protonVersion", "experimental-11").put("auto", true))
|
||||
assertNull(run(g710))
|
||||
val undone = mutableListOf<String>()
|
||||
run(full, undoAuto = { id, comp -> undone += "$id $comp"; "undone" })
|
||||
assertEquals(listOf("proton-exp dxvk"), undone)
|
||||
}
|
||||
|
||||
@Test fun theSwapAndItsUndoReachTheProton() {
|
||||
proton("proton-exp")
|
||||
val d3d11 = File(protonDir("proton-exp"), "files/lib/wine/dxvk/aarch64-windows/d3d11.dll")
|
||||
writePackage(old, "DXVK 1.10.3")
|
||||
val auto: (String, String) -> String = { id, file -> ComponentsManager.swap(context, id, file, auto = true) }
|
||||
val undo: (String, String) -> String = { id, comp -> ComponentsManager.undoAutoChoice(context, id, comp) }
|
||||
|
||||
assertNotNull(run(g710, applyAuto = auto, undoAuto = undo))
|
||||
assertEquals("DXVK 1.10.3", d3d11.readText())
|
||||
val entry = state().getJSONObject("active").getJSONObject("proton-exp").getJSONObject("dxvk")
|
||||
assertEquals(old, entry.getString("file"))
|
||||
assertTrue(entry.getBoolean("auto"))
|
||||
assertNull(run(g710, applyAuto = auto, undoAuto = undo))
|
||||
|
||||
run(full, applyAuto = auto, undoAuto = undo)
|
||||
assertEquals("bundled DXVK experimental-11", d3d11.readText())
|
||||
assertNull(state().getJSONObject("active").optJSONObject("proton-exp")?.optJSONObject("dxvk"))
|
||||
}
|
||||
|
||||
@Test fun aFailedDetectionKeepsTheLastAutomaticChoice() {
|
||||
proton("proton-exp")
|
||||
writeState("proton-exp", JSONObject().put("file", old).put("protonVersion", "experimental-11").put("auto", true))
|
||||
assertNull(run(null))
|
||||
assertEquals(old, state().getJSONObject("active").getJSONObject("proton-exp").getJSONObject("dxvk").getString("file"))
|
||||
}
|
||||
|
||||
@Test fun oneProtonFailingDoesNotStopTheOthers() {
|
||||
proton("ge")
|
||||
proton("proton-exp")
|
||||
val applied = mutableListOf<String>()
|
||||
val result = run(g710, applyAuto = { id, file -> if (id == "ge") error("disk full"); applied += "$id $file"; "swapped $id" })
|
||||
assertEquals(listOf("proton-exp $old"), applied)
|
||||
assertTrue(result!!, result.contains("disk full") && result.contains("swapped proton-exp"))
|
||||
}
|
||||
|
||||
@Test fun aChoiceWhoseSavedCopyIsGoneIsKept() {
|
||||
proton("proton-exp")
|
||||
writeState("proton-exp", JSONObject().put("file", old).put("label", "DXVK 1.10.3").put("protonVersion", "experimental-11").put("auto", true))
|
||||
val result = run(full, undoAuto = { id, comp -> ComponentsManager.undoAutoChoice(context, id, comp) })
|
||||
assertTrue(result!!, result.contains("its own copy is gone"))
|
||||
assertEquals(old, state().getJSONObject("active").getJSONObject("proton-exp").getJSONObject("dxvk").getString("file"))
|
||||
}
|
||||
|
||||
@Test fun aProtonUpdateWithNoRuleLeftJustForgetsTheChoice() {
|
||||
proton("proton-exp", "experimental-12")
|
||||
writeState("proton-exp", JSONObject().put("file", old).put("protonVersion", "experimental-11").put("auto", true))
|
||||
run(full, undoAuto = { id, comp -> ComponentsManager.undoAutoChoice(context, id, comp) })
|
||||
assertNull(state().getJSONObject("active").optJSONObject("proton-exp")?.optJSONObject("dxvk"))
|
||||
assertEquals("bundled DXVK experimental-12", File(protonDir("proton-exp"), "files/lib/wine/dxvk/aarch64-windows/d3d11.dll").readText())
|
||||
}
|
||||
|
||||
@Test fun thePlayerCanKeepProtonsOwnDxvk() {
|
||||
proton("proton-exp")
|
||||
assertNull("nothing chosen when declined", run(g710, keep = true))
|
||||
writeState("proton-exp", JSONObject().put("file", old).put("protonVersion", "experimental-11").put("auto", true))
|
||||
val undone = mutableListOf<String>()
|
||||
run(g710, keep = true, undoAuto = { id, comp -> undone += "$id $comp"; "undone" })
|
||||
assertEquals("an earlier automatic choice goes back", listOf("proton-exp dxvk"), undone)
|
||||
}
|
||||
|
||||
@Test fun turningTheBridgeOffRestoresProtonsOwn() {
|
||||
proton("proton-exp")
|
||||
val d3d11 = File(protonDir("proton-exp"), "files/lib/wine/dxvk/aarch64-windows/d3d11.dll")
|
||||
writePackage(old, "DXVK 1.10.3")
|
||||
val auto: (String, String) -> String = { id, file -> ComponentsManager.swap(context, id, file, auto = true) }
|
||||
val undo: (String, String) -> String = { id, comp -> ComponentsManager.undoAutoChoice(context, id, comp) }
|
||||
run(g710, applyAuto = auto, undoAuto = undo)
|
||||
assertEquals("DXVK 1.10.3", d3d11.readText())
|
||||
run(null, bridge = false, applyAuto = auto, undoAuto = undo)
|
||||
assertEquals("bundled DXVK experimental-11", d3d11.readText())
|
||||
assertNull(state().getJSONObject("active").optJSONObject("proton-exp")?.optJSONObject("dxvk"))
|
||||
}
|
||||
|
||||
@Test fun turningTheBridgeOffKeepsThePlayersOwnChoice() {
|
||||
proton("proton-exp")
|
||||
writeState("proton-exp", JSONObject().put("file", "dxvk-3.1-linux.wcp").put("protonVersion", "experimental-11"))
|
||||
assertNull(run(g710, bridge = false))
|
||||
assertNull(run(g710, keep = true))
|
||||
}
|
||||
|
||||
@Test fun aQueuedAutomaticSwapIsDroppedWhenTheBridgeIsOff() {
|
||||
proton("proton-exp")
|
||||
val f = File(context.filesDir, "components/state.json")
|
||||
f.parentFile!!.mkdirs()
|
||||
f.writeText(JSONObject().put("active", JSONObject())
|
||||
.put("queued", JSONObject().put("proton-exp", JSONObject()
|
||||
.put("dxvk", JSONObject().put("kind", "package").put("file", old).put("auto", true))
|
||||
.put("vkd3d", JSONObject().put("kind", "package").put("file", "vkd3d-x.wcp")))).toString())
|
||||
assertNull(run(null, bridge = false))
|
||||
val q = state().getJSONObject("queued").getJSONObject("proton-exp")
|
||||
assertFalse(q.has("dxvk"))
|
||||
assertTrue("the player's own queued swap stays", q.has("vkd3d"))
|
||||
}
|
||||
|
||||
@Test fun whenAutomaticChoicesAreUndone() {
|
||||
val rule = ComponentsManager.bridgeDxvk(g710)
|
||||
assertTrue(ComponentsManager.autoDxvkUndoWanted(false, false, null, null))
|
||||
assertTrue(ComponentsManager.autoDxvkUndoWanted(true, true, g710, null))
|
||||
assertTrue(ComponentsManager.autoDxvkUndoWanted(true, false, full, null))
|
||||
assertFalse("failed detection keeps it", ComponentsManager.autoDxvkUndoWanted(true, false, null, null))
|
||||
assertFalse(ComponentsManager.autoDxvkUndoWanted(true, false, g710, rule))
|
||||
}
|
||||
|
||||
private fun run(
|
||||
vk: AppVulkan?,
|
||||
bridge: Boolean = true,
|
||||
keep: Boolean = false,
|
||||
applyAuto: (String, String) -> String = { id, file -> error("apply $id $file") },
|
||||
undoAuto: (String, String) -> String = { id, comp -> error("undo $id $comp") },
|
||||
) = ComponentsManager.ensureForcedPackages(
|
||||
context, mali,
|
||||
lookup = { file, release -> ComponentsManager.CatalogItem(file, "dxvk", release, "https://example.invalid/$file", 4, "sha256:" + "ab".repeat(32)) },
|
||||
fetch = {},
|
||||
apply = { id, file -> error("non-automatic apply $id $file") },
|
||||
vulkan = vk, bridgeSession = bridge, applyAuto = applyAuto, undoAuto = undoAuto, keepProtonDxvk = keep,
|
||||
)
|
||||
|
||||
private fun protonDir(name: String) = File(LinuxRuntime.rootDir(context), "root/.local/share/Steam/steamapps/common/$name")
|
||||
|
||||
private fun proton(name: String, version: String = "experimental-11") {
|
||||
val dir = protonDir(name)
|
||||
File(dir, "files/lib/wine").mkdirs()
|
||||
File(dir, "proton").writeText("#!/bin/sh\n")
|
||||
File(dir, "version").writeText("1 $version\n")
|
||||
File(dir, "files/lib/wine/dxvk/aarch64-windows/d3d11.dll").apply {
|
||||
parentFile!!.mkdirs()
|
||||
writeText("bundled DXVK $version")
|
||||
}
|
||||
}
|
||||
|
||||
private fun state() = JSONObject(File(context.filesDir, "components/state.json").readText())
|
||||
|
||||
private fun writeState(protonId: String, dxvk: JSONObject) {
|
||||
val f = File(context.filesDir, "components/state.json")
|
||||
f.parentFile!!.mkdirs()
|
||||
f.writeText(JSONObject().put("active", JSONObject().put(protonId, JSONObject().put("dxvk", dxvk)))
|
||||
.put("queued", JSONObject()).toString())
|
||||
}
|
||||
|
||||
private fun writePackage(file: String, d3d11: String) {
|
||||
val dest = File(context.filesDir, "components/packages/$file")
|
||||
dest.parentFile!!.mkdirs()
|
||||
TarArchiveOutputStream(ZstdOutputStream(dest.outputStream())).use { tar ->
|
||||
fun put(name: String, bytes: ByteArray) {
|
||||
tar.putArchiveEntry(TarArchiveEntry(name).apply { size = bytes.size.toLong() })
|
||||
tar.write(bytes)
|
||||
tar.closeArchiveEntry()
|
||||
}
|
||||
put("./profile.json", JSONObject().put("type", "DXVK-Linux").put("versionName", file.removeSuffix(".wcp")).toString().toByteArray())
|
||||
put("./files/lib/wine/dxvk/aarch64-windows/d3d11.dll", d3d11.toByteArray())
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
MaliBridge
|
||||
Copyright (C) 2026 ASEbrahim and MaliBridge contributors
|
||||
https://github.com/ASEbrahim/MaliBridge
|
||||
|
||||
MaliBridge is free software: you can redistribute it and/or modify it under the terms of the GNU
|
||||
General Public License as published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version. See LICENSE.
|
||||
|
||||
Additional terms under section 7 of the GNU GPL version 3:
|
||||
|
||||
1. Attribution (section 7(b)). Anyone who conveys MaliBridge, or a work based on it, in source or
|
||||
object form must keep the notice "MaliBridge by ASEbrahim" with a link to
|
||||
https://github.com/ASEbrahim/MaliBridge in the conveyed work's documentation, and, where the
|
||||
work has a user interface that shows credits, licences or an "about" screen, in that screen.
|
||||
|
||||
2. Names (section 7(e)). This licence grants no right to use the name "MaliBridge" or the
|
||||
author's name to name or promote a modified version. A modified version must be marked as
|
||||
changed and must not be presented as MaliBridge or as the author's work.
|
||||
|
||||
Third-party components keep their own licences and notices (third_party/ and the files that name
|
||||
them).
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
# MaliBridge by ASEbrahim
|
||||
|
||||
MaliBridge by ASEbrahim: https://github.com/ASEbrahim/MaliBridge
|
||||
(GPL-3.0-or-later with the additional terms in NOTICE here, copied unchanged from the project).
|
||||
|
||||
DroidDeck builds MaliBridge from the `external/MaliBridge` submodule, pinned at 48477fe
|
||||
(v0.5.4) and not modified. Its Vulkan ICD runs inside the Linux runtime and forwards each call
|
||||
over a Unix socket to its server, which runs in the app on the phone's own Vulkan driver.
|
||||
DroidDeck uses it only on a GPU without Adreno's KGSL; an Adreno keeps Turnip.
|
||||
|
||||
The DroidDeck side of the bridge (the Setup switches, the server's start and session wiring, the
|
||||
Mali render node stand-in, the compositor's AHardwareBuffer import off Adreno, the Steam web helper
|
||||
layout, the socket wait and the DXVK choice for older Vulkan drivers) is Ahmad Sayed Alsayed
|
||||
Ebrahim's (ASEbrahim) work from https://github.com/ASEbrahim/DroidDeck, kept under their name in
|
||||
this repository's history.
|
||||
|
||||
MaliBridge's own credits, in its README, include:
|
||||
|
||||
- Vulkan-Headers 1.4.341 (Khronos Group), Apache-2.0 OR MIT: https://github.com/KhronosGroup/Vulkan-Headers
|
||||
- Arm's HWCPipe (MIT), whose counter layouts its GPU counter reader follows: https://github.com/ARM-software/HWCPipe
|
||||
- bcdec by Sergii Kudlai, MIT or Unlicense: https://github.com/iOrange/bcdec
|
||||
- etc2_encode by Lee Gao, MIT: https://github.com/leegao/etc2_encode
|
||||
- Lee Gao's Mali findings and SPIRV-Tools MaliOptimizationBarrierPass (Apache-2.0):
|
||||
https://github.com/leegao/SPIRV-Tools, and compat_layer (MIT): https://github.com/leegao/compat_layer
|
||||
- Julius Pinsker's bionic-vulkan-wrapper PR #228 (MIT)
|
||||
- David Cimo's droiddeck-mali (GPL-3.0): https://github.com/DavidCimo/droiddeck-mali
|
||||
- The412Banner's Mali compatibility layer and testing on the DroidDeck branch `test/non-adreno-all`
|
||||
- taowen's libhybris `arlinux` branch (Apache-2.0): https://github.com/taowen/libhybris/tree/arlinux
|
||||
- GameNative (GPL-3.0), wallentx's placed-memory layer for DroidDeck (MIT), Arm's published errata,
|
||||
ANGLE's Mali workarounds, and design notes from Winlator's Vortek
|
||||
|
||||
Each keeps its own licence and notice in the submodule (`third_party/` and the files that name
|
||||
them).
|
||||
+1
Submodule external/MaliBridge added at 48477fe6c4.
@@ -41,6 +41,10 @@ if [[ ! -x "${java_dir}/bin/java" ]]; then
|
||||
echo "Java 17 not found at ${java_dir}; set JAVA_HOME." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f "${repo_root}/external/MaliBridge/scripts/build-client-linux.sh" ]]; then
|
||||
echo "external/MaliBridge is empty; run: git submodule update --init" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! command -v docker >/dev/null 2>&1; then
|
||||
echo "Docker is required to cross-compile the glibc ARM64 preload libraries." >&2
|
||||
exit 1
|
||||
@@ -138,6 +142,7 @@ docker run --rm --platform "${docker_platform}" \
|
||||
-o "$d/libssbs.so" tools/linuxfs/ssbs/ssbs_adapter.c -ldl
|
||||
aarch64-linux-gnu-strip --strip-unneeded "$d/libssbs.so"
|
||||
mkdir -p "$d/usr/local/bin"
|
||||
external/MaliBridge/scripts/build-client-linux.sh "$d" aarch64-linux-gnu-gcc
|
||||
aarch64-linux-gnu-gcc -O2 -Wall -Wextra -o "$d/usr/local/bin/droiddeck-clipboard" tools/linuxfs/clipboard/clipboard.c -ldl
|
||||
aarch64-linux-gnu-strip --strip-unneeded "$d/usr/local/bin/droiddeck-clipboard"
|
||||
for script in tools/linuxfs/overlay/usr/local/bin/droiddeck-* tools/linuxfs/overlay/usr/local/bin/steam-compatibility; do
|
||||
|
||||
@@ -35,6 +35,9 @@ def identity(name, root=ROOT):
|
||||
for name_ in sorted(set(paths)):
|
||||
if '__pycache__' in name_ or name_.endswith(('.pyc', '.md')):
|
||||
continue
|
||||
if (root / name_).is_dir():
|
||||
values[name_] = subprocess.check_output(['git', 'ls-files', '--stage', '--', name_], cwd=root, text=True).split()[1]
|
||||
continue
|
||||
content = (root / name_).read_bytes()
|
||||
if b'\0' not in content:
|
||||
content = content.replace(b'\r\n', b'\n')
|
||||
|
||||
@@ -222,5 +222,20 @@
|
||||
"cmake",
|
||||
"xz-utils"
|
||||
]
|
||||
},
|
||||
"vkbridge": {
|
||||
"script": "tools/components/recipes/vkbridge.sh",
|
||||
"inputs": [
|
||||
"external/MaliBridge",
|
||||
"tools/components/recipes/vkbridge.sh"
|
||||
],
|
||||
"outputs": [
|
||||
"app/src/main/assets/linuxfs/usr/local/lib/vkbridge/libvulkan_droidbridge.so",
|
||||
"app/src/main/assets/linuxfs/usr/local/share/vkbridge/droidbridge_icd.json",
|
||||
"app/src/main/assets/linuxfs/usr/local/bin/droiddeck-vkbridge-smoke"
|
||||
],
|
||||
"packages": [
|
||||
"gcc-aarch64-linux-gnu"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
test -f external/MaliBridge/scripts/build-client-linux.sh
|
||||
bash external/MaliBridge/scripts/build-client-linux.sh app/src/main/assets/linuxfs aarch64-linux-gnu-gcc
|
||||
@@ -487,6 +487,14 @@ def apply_config(env, config, app_id, fixes=None):
|
||||
return result
|
||||
|
||||
|
||||
def bridge_feature_level(env):
|
||||
if env.get("BL_VKBRIDGE") != "1" or env.get("VKD3D_FEATURE_LEVEL") not in ("12_1", "12_2"):
|
||||
return None
|
||||
was = env["VKD3D_FEATURE_LEVEL"]
|
||||
env["VKD3D_FEATURE_LEVEL"] = "12_0"
|
||||
return "Mali bridge: VKD3D_FEATURE_LEVEL %s capped at 12_0 (no ray tracing or mesh shaders)" % was
|
||||
|
||||
|
||||
GAME_DEBUG_CHANNELS = (
|
||||
"timestamp", "pid", "tid", "seh", "unwind", "threadname", "debugstr", "loaddll", "mscoree",
|
||||
)
|
||||
@@ -808,6 +816,9 @@ def main():
|
||||
env["AUDIO_DIRECT_MIC"] = "0"
|
||||
env = directaudio_settings(env)
|
||||
env = vram_cap(env)
|
||||
note = bridge_feature_level(env)
|
||||
if note:
|
||||
print("droiddeck-game-env: " + note, file=sys.stderr)
|
||||
env = force_ssbs(command, env)
|
||||
game_cores(env)
|
||||
cpu_topology(env, command)
|
||||
|
||||
@@ -161,7 +161,7 @@ collect_steam_logs() {
|
||||
cp "$fex_state/status.json" "$fex_state/config/Config.json" "$BL_DEBUG_DIR/droiddeck-fex/" 2>/dev/null
|
||||
fi
|
||||
}
|
||||
trap 'collect_steam_logs 2>/dev/null || true' TERM INT HUP
|
||||
trap 'bl_stopping=1; collect_steam_logs 2>/dev/null || true' TERM INT HUP
|
||||
if [ -n "${BL_VK_DRIVER:-}" ]; then
|
||||
bl_icd_lib=$(sed -n 's/.*"library_path"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$BL_VK_DRIVER" 2>/dev/null | head -1)
|
||||
bl_icd_lib=$(printf '%s' "$bl_icd_lib" | sed 's|\\/|/|g')
|
||||
@@ -178,6 +178,82 @@ if [ -n "${BL_VK_DRIVER:-}" ]; then
|
||||
fi
|
||||
unset bl_icd_lib
|
||||
fi
|
||||
bl_webhelper_layout() {
|
||||
if [ -n "${BL_VKBRIDGE_WEBHELPER_ARGS:-}" ]; then
|
||||
printf '%s\n' "$BL_VKBRIDGE_WEBHELPER_ARGS"
|
||||
elif [ -z "${BL_VKBRIDGE_CEF_ANGLE:-}" ]; then
|
||||
echo stock
|
||||
elif [ "$BL_VKBRIDGE_CEF_ANGLE" = vulkan ] && [ "${BL_VKBRIDGE_CEF_VULKAN:-1}" != 0 ]; then
|
||||
echo "--use-gl=angle --use-angle=vulkan +Vulkan +VulkanFromANGLE +DefaultANGLEVulkan"
|
||||
else
|
||||
echo "--use-gl=angle --use-angle=$BL_VKBRIDGE_CEF_ANGLE"
|
||||
fi
|
||||
}
|
||||
bl_now_ms() {
|
||||
if [ -n "${EPOCHREALTIME:-}" ]; then
|
||||
local t=${EPOCHREALTIME/[.,]/}
|
||||
echo $((10#$t / 1000))
|
||||
else
|
||||
date +%s%3N
|
||||
fi
|
||||
}
|
||||
vkbridge_wait_socket() {
|
||||
local sock=$1 limit=${2:-10000} start now waited
|
||||
[ -n "$sock" ] || return 1
|
||||
if [ -S "$sock" ]; then
|
||||
echo "== vkbridge: server socket ready (waited 0 ms)"
|
||||
return 0
|
||||
fi
|
||||
start=$(bl_now_ms)
|
||||
while :; do
|
||||
now=$(bl_now_ms)
|
||||
waited=$((now - start))
|
||||
if [ -S "$sock" ]; then
|
||||
echo "== vkbridge: server socket ready (waited $waited ms; the server listens after its startup probe)"
|
||||
return 0
|
||||
fi
|
||||
if [ -n "${bl_stopping:-}" ]; then
|
||||
echo "== vkbridge: no server socket after $waited ms; the session is stopping"
|
||||
return 1
|
||||
fi
|
||||
if [ "$waited" -ge "$limit" ]; then
|
||||
echo "== vkbridge: no server socket after $waited ms (gave up at $limit ms)"
|
||||
return 1
|
||||
fi
|
||||
sleep 0.05
|
||||
done
|
||||
}
|
||||
if [ "${BL_VKBRIDGE:-0}" = 1 ]; then
|
||||
bl_vkb_icd=/usr/local/share/vkbridge/droidbridge_icd.json
|
||||
[ -z "${BL_INSIDE:-}" ] && vkbridge_wait_socket "${VKBRIDGE_SOCKET:-}" "${BL_VKBRIDGE_WAIT_MS:-10000}"
|
||||
bl_vkb_missing=
|
||||
[ -r "$bl_vkb_icd" ] || bl_vkb_missing="$bl_vkb_missing icd"
|
||||
[ -r /usr/local/lib/vkbridge/libvulkan_droidbridge.so ] || bl_vkb_missing="$bl_vkb_missing library"
|
||||
[ -S "${VKBRIDGE_SOCKET:-}" ] || bl_vkb_missing="$bl_vkb_missing socket"
|
||||
if [ -z "$bl_vkb_missing" ]; then
|
||||
export VK_DRIVER_FILES=$bl_vkb_icd VK_ICD_FILENAMES=$bl_vkb_icd
|
||||
export VKBRIDGE_SOCKET VKBRIDGE_CLIENT_LOG
|
||||
if [ -r /root/.vkbridge-env ]; then
|
||||
while IFS='=' read -r _k _v; do
|
||||
case "$_k" in VKBRIDGE_*|BL_VKBRIDGE_*) export "$_k=$_v" ;; esac
|
||||
done < /root/.vkbridge-env
|
||||
[ -z "${BL_INSIDE:-}" ] && echo "== vkbridge: development settings from /root/.vkbridge-env: $(cut -d= -f1 /root/.vkbridge-env | tr '\n' ' ')"
|
||||
fi
|
||||
export VKD3D_FEATURE_LEVEL=${VKD3D_FEATURE_LEVEL:-12_0}
|
||||
unset TU_DEBUG
|
||||
if [ -z "${BL_INSIDE:-}" ]; then
|
||||
step "vkbridge self-test"
|
||||
timeout 60 /usr/local/bin/droiddeck-vkbridge-smoke 2>&1 | sed 's/^/== vkbridge: /'
|
||||
if command -v vulkaninfo >/dev/null 2>&1; then
|
||||
timeout 30 vulkaninfo --summary 2>&1 | sed -n '/^Devices:/,$p' | head -40 | sed 's/^/== vulkaninfo: /'
|
||||
fi
|
||||
fi
|
||||
echo "== vulkan driver: Mali bridge ($bl_vkb_icd, server at $VKBRIDGE_SOCKET)"
|
||||
else
|
||||
echo "== vulkan driver: Mali bridge requested but NOT usable (icd $bl_vkb_icd, socket ${VKBRIDGE_SOCKET:-unset}; missing:$bl_vkb_missing); this GPU will show a black screen"
|
||||
fi
|
||||
unset bl_vkb_icd bl_vkb_missing
|
||||
fi
|
||||
export GAMESCOPE_FORCE_VULKAN_REALTIME=${BL_GAMESCOPE_REALTIME:-0}
|
||||
|
||||
start_agent() {
|
||||
@@ -310,6 +386,13 @@ if [ -z "${BL_INSIDE:-}" ]; then
|
||||
if [ "$mode" = steam ] && [ "${BL_CURSOR_COMPOSITE:-0}" = 1 ]; then
|
||||
export gamescope_cursor_composite=2
|
||||
fi
|
||||
# Through the Mali bridge, Steam's UI flickered while gamescope handed its layers to the phone's
|
||||
# compositor as separate planes, for a reason not yet found; one composited image does not
|
||||
# (Mali-G76 MC4: 145 footer flips in 6 s at rest, 0 composited).
|
||||
if [ "$mode" = steam ] && [ "${BL_VKBRIDGE:-0}" = 1 ] && [ -z "${gamescope_composite_force:-}" ]; then
|
||||
export gamescope_composite_force=1
|
||||
echo "== gamescope: composites every frame (Mali bridge: the Steam UI flickers on separate planes)"
|
||||
fi
|
||||
args=(--backend wayland --expose-wayland -f -W "$width" -H "$height" -w "$nested" -h "$nested_h")
|
||||
if [ "$nested" != "$width" ] || [ "$nested_h" != "$height" ]; then
|
||||
args+=(-S stretch)
|
||||
@@ -1023,6 +1106,28 @@ case $mode in
|
||||
_bl_cef=(-cef-disable-gpu)
|
||||
_bl_ui=(-nobigpicture)
|
||||
fi
|
||||
if [ "${BL_VKBRIDGE:-0}" = 1 ]; then
|
||||
# On the GPU the Steam UI held about 400 MB through the bridge (Mali-G76 MC4, 3 GB of RAM); with
|
||||
# a game loading beside it, Android's low-memory killer took the whole session down.
|
||||
if [ -z "${BL_VKBRIDGE_CEF_GPU:-}" ]; then
|
||||
_bl_mem_kb=$(awk '/^MemTotal:/ {print $2}' /proc/meminfo 2>/dev/null)
|
||||
if [ "${_bl_mem_kb:-0}" -gt 0 ] && [ "$_bl_mem_kb" -lt 4194304 ]; then
|
||||
BL_VKBRIDGE_CEF_GPU=0
|
||||
echo "== steam: $((_bl_mem_kb / 1024)) MB of RAM: the browser UI draws in software to leave games the memory"
|
||||
fi
|
||||
fi
|
||||
if [ "${BL_VKBRIDGE_CEF_GPU:-1}" = 0 ]; then
|
||||
_bl_cef=(-cef-disable-gpu -cef-disable-gpu-compositing)
|
||||
echo "== steam: browser UI in software (Mali bridge)"
|
||||
elif [ "${_bl_cef[0]}" = -cef-force-gpu ]; then
|
||||
_bl_cef=(-cef-force-gpu -cef-use-gl=angle -cef-use-angle="${BL_VKBRIDGE_CEF_ANGLE:-vulkan}")
|
||||
fi
|
||||
[ "${BL_VKBRIDGE_CEF_LOG:-0}" = 1 ] && _bl_cef+=(-cef-enable-logging=stderr -cef-v=1)
|
||||
[ -n "${BL_VKBRIDGE_CEF_EXTRA:-}" ] && read -r -a _bl_cef_extra <<<"$BL_VKBRIDGE_CEF_EXTRA" && _bl_cef+=("${_bl_cef_extra[@]}")
|
||||
BL_WEBHELPER_ARGS=$(bl_webhelper_layout)
|
||||
export BL_WEBHELPER_ARGS
|
||||
echo "== steam: web helper process layout: $BL_WEBHELPER_ARGS (Mali bridge)"
|
||||
fi
|
||||
if [ "${BL_STEAM_UI:-}" != desktop ]; then
|
||||
if [ "$steam_x64" = 0 ] || [ "${BL_X64_DECK:-1}" != 0 ]; then
|
||||
_bl_ui+=(-steamdeck -steamos3)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <pthread.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/syscall.h>
|
||||
@@ -34,7 +35,8 @@ static int is_kgsl(int fd) {
|
||||
struct stat st;
|
||||
pthread_mutex_lock(&lock);
|
||||
if (kgsl_state == 0) {
|
||||
kgsl_state = stat("/dev/kgsl-3d0", &st) == 0 ? 1 : -1;
|
||||
const char *standin = getenv("BL_DRM_STANDIN");
|
||||
kgsl_state = stat("/dev/kgsl-3d0", &st) == 0 || (standin && *standin && stat(standin, &st) == 0) ? 1 : -1;
|
||||
kgsl_dev = st.st_rdev;
|
||||
}
|
||||
pthread_mutex_unlock(&lock);
|
||||
@@ -49,18 +51,42 @@ static void *real(const char *name) {
|
||||
return fn;
|
||||
}
|
||||
|
||||
static int same_by_flock(int a, int b) {
|
||||
struct stat sa, sb;
|
||||
if (fstat(a, &sa) || fstat(b, &sb) || sa.st_dev != sb.st_dev || sa.st_ino != sb.st_ino ||
|
||||
flock(a, LOCK_EX | LOCK_NB)) {
|
||||
return 0;
|
||||
}
|
||||
int same = flock(b, LOCK_EX | LOCK_NB) == 0;
|
||||
flock(a, LOCK_UN);
|
||||
return same;
|
||||
}
|
||||
|
||||
static int same_file_description(int a, int b) {
|
||||
if (a == b) {
|
||||
return 1;
|
||||
}
|
||||
#ifdef SYS_kcmp
|
||||
int saved_errno = errno;
|
||||
long ret = syscall(SYS_kcmp, getpid(), getpid(), 0 , a, b);
|
||||
errno = saved_errno;
|
||||
return ret == 0;
|
||||
#else
|
||||
return 0;
|
||||
int ret = -1;
|
||||
#ifdef SYS_kcmp
|
||||
static int kcmp_missing;
|
||||
if (!kcmp_missing) {
|
||||
long k = syscall(SYS_kcmp, getpid(), getpid(), 0, a, b);
|
||||
if (k >= 0) {
|
||||
ret = k == 0;
|
||||
} else if (errno == ENOSYS || errno == EPERM) {
|
||||
kcmp_missing = 1;
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (ret < 0) {
|
||||
const char *standin = getenv("BL_DRM_STANDIN");
|
||||
ret = standin && *standin ? same_by_flock(a, b) : 0;
|
||||
}
|
||||
errno = saved_errno;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int find_handle_locked(int fd, uint32_t handle) {
|
||||
|
||||
@@ -57,6 +57,26 @@ class ComponentPrepareTest(unittest.TestCase):
|
||||
script.write_text(script.read_text() + '\nprintf changed\n')
|
||||
self.assertNotEqual(changed, components.identity('fake', self.root))
|
||||
|
||||
def test_identity_follows_a_submodule_commit(self):
|
||||
library = self.root / 'library'
|
||||
subprocess.run(['git', 'init', '-q', str(library)], check=True)
|
||||
def commit(text):
|
||||
(library / 'source.c').write_text(text)
|
||||
subprocess.run(['git', '-C', str(library), 'add', '.'], check=True)
|
||||
subprocess.run(['git', '-C', str(library), '-c', 'user.name=Test Developer', '-c', 'user.email=test@example.test',
|
||||
'commit', '-qm', text], check=True)
|
||||
return subprocess.check_output(['git', '-C', str(library), 'rev-parse', 'HEAD'], text=True).strip()
|
||||
first = commit('int a;\n')
|
||||
subprocess.run(['git', '-C', str(self.root), 'add', 'library'], check=True)
|
||||
spec = dict(script='tools/components/recipes/fake.sh', inputs=['library'], outputs=[])
|
||||
(self.root / components.REGISTRY).write_text(json.dumps(dict(fake=spec)))
|
||||
original = components.identity('fake', self.root)
|
||||
commit('int b;\n')
|
||||
self.assertEqual(original, components.identity('fake', self.root))
|
||||
subprocess.run(['git', '-C', str(self.root), 'add', 'library'], check=True)
|
||||
self.assertNotEqual(original, components.identity('fake', self.root))
|
||||
self.assertNotEqual(first, subprocess.check_output(['git', '-C', str(library), 'rev-parse', 'HEAD'], text=True).strip())
|
||||
|
||||
def test_tool_requirements_are_installed_in_one_union(self):
|
||||
definitions = dict(one=dict(packages=['gcc', 'cmake']), two=dict(packages=['gcc', 'qemu-user']))
|
||||
with patch.object(components, 'registry', return_value=definitions), patch.object(components.subprocess, 'run') as run:
|
||||
|
||||
@@ -346,6 +346,15 @@ class GameEnvironmentTest(unittest.TestCase):
|
||||
self.assertEqual(evaluate(), (0, 2))
|
||||
self.assertEqual(evaluate("changed"), (0, 3))
|
||||
|
||||
def test_the_mali_bridge_caps_the_vkd3d_feature_level(self):
|
||||
bridge = {"BL_VKBRIDGE": "1", "VKD3D_FEATURE_LEVEL": "12_2"}
|
||||
self.assertIn("capped", MODULE["bridge_feature_level"](bridge))
|
||||
self.assertEqual(bridge["VKD3D_FEATURE_LEVEL"], "12_0")
|
||||
for env in ({"BL_VKBRIDGE": "1", "VKD3D_FEATURE_LEVEL": "11_1"}, {"VKD3D_FEATURE_LEVEL": "12_2"}, {"BL_VKBRIDGE": "1"}):
|
||||
before = dict(env)
|
||||
self.assertIsNone(MODULE["bridge_feature_level"](env))
|
||||
self.assertEqual(env, before)
|
||||
|
||||
def test_profile_precedence_and_unset(self):
|
||||
env = {"KEEP": "inherited", "REMOVE": "inherited", "CUSTOM": "launch option"}
|
||||
config = {"version": 1, "shared": {"CUSTOM": "shared"}, "games": {"42": {"REMOVE": None, "CUSTOM": "game", "EMPTY": ""}}}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import socket
|
||||
import subprocess
|
||||
import tempfile
|
||||
import threading
|
||||
import time
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
SESSION = Path(__file__).resolve().parents[1] / "linuxfs/overlay/usr/local/bin/droiddeck-session"
|
||||
|
||||
|
||||
def wait_functions():
|
||||
text = SESSION.read_text()
|
||||
found = []
|
||||
for name in ("bl_now_ms", "vkbridge_wait_socket"):
|
||||
match = re.search(r"^%s\(\) \{\n.*?^\}\n" % name, text, re.M | re.S)
|
||||
if match:
|
||||
found.append(match.group(0))
|
||||
return found
|
||||
|
||||
|
||||
class VkBridgeSocketWaitTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.root = Path(tempfile.mkdtemp())
|
||||
self.addCleanup(shutil.rmtree, self.root, True)
|
||||
self.sock = self.root / "vkbridge" / "server.sock"
|
||||
self.sock.parent.mkdir()
|
||||
self.listeners = []
|
||||
self.addCleanup(lambda: [s.close() for s in self.listeners])
|
||||
|
||||
def listen(self):
|
||||
listener = socket.socket(socket.AF_UNIX)
|
||||
listener.bind(str(self.sock))
|
||||
listener.listen(1)
|
||||
self.listeners.append(listener)
|
||||
|
||||
def listen_after(self, seconds):
|
||||
timer = threading.Timer(seconds, self.listen)
|
||||
timer.start()
|
||||
self.addCleanup(timer.cancel)
|
||||
|
||||
def run_wait(self, limit_ms, prelude=""):
|
||||
functions = wait_functions()
|
||||
self.assertEqual(2, len(functions), "droiddeck-session lacks bl_now_ms() or vkbridge_wait_socket()")
|
||||
script = "set -u\n" + "".join(functions) + prelude
|
||||
script += 'if vkbridge_wait_socket "$1" "$2"; then echo USABLE; else echo FALLBACK; fi\n'
|
||||
started = time.monotonic()
|
||||
out = subprocess.run(["bash", "-c", script, "session", str(self.sock), str(limit_ms)],
|
||||
capture_output=True, text=True, timeout=30, check=True).stdout
|
||||
return out, time.monotonic() - started
|
||||
|
||||
def waited_ms(self, out):
|
||||
match = re.search(r"waited (\d+) ms|after (\d+) ms", out)
|
||||
self.assertIsNotNone(match, out)
|
||||
return int(match.group(1) or match.group(2))
|
||||
|
||||
def test_a_socket_already_listening_is_used_at_once(self):
|
||||
self.listen()
|
||||
out, elapsed = self.run_wait(10000)
|
||||
self.assertTrue(out.endswith("USABLE\n"), out)
|
||||
self.assertIn("== vkbridge: server socket ready (waited 0 ms)", out)
|
||||
self.assertLess(elapsed, 2)
|
||||
|
||||
def test_a_server_still_probing_is_waited_for(self):
|
||||
self.listen_after(0.4)
|
||||
out, elapsed = self.run_wait(10000)
|
||||
self.assertTrue(out.endswith("USABLE\n"), out)
|
||||
self.assertIn("== vkbridge: server socket ready (waited ", out)
|
||||
waited = self.waited_ms(out)
|
||||
self.assertGreaterEqual(waited, 300, out)
|
||||
self.assertLess(waited, 5000, out)
|
||||
self.assertLess(elapsed, 6)
|
||||
|
||||
def test_no_server_falls_back_after_the_limit(self):
|
||||
out, elapsed = self.run_wait(300)
|
||||
self.assertTrue(out.endswith("FALLBACK\n"), out)
|
||||
self.assertIn("== vkbridge: no server socket after ", out)
|
||||
self.assertIn("(gave up at 300 ms)", out)
|
||||
self.assertGreaterEqual(self.waited_ms(out), 300)
|
||||
self.assertLess(elapsed, 5)
|
||||
|
||||
def test_a_plain_file_is_not_a_socket(self):
|
||||
self.sock.write_text("stale")
|
||||
out, _ = self.run_wait(200)
|
||||
self.assertTrue(out.endswith("FALLBACK\n"), out)
|
||||
|
||||
def test_a_stopping_session_does_not_wait(self):
|
||||
out, elapsed = self.run_wait(10000, prelude="bl_stopping=1\n")
|
||||
self.assertTrue(out.endswith("FALLBACK\n"), out)
|
||||
self.assertIn("the session is stopping", out)
|
||||
self.assertLess(elapsed, 2)
|
||||
|
||||
def test_no_socket_path_is_a_fallback_without_waiting(self):
|
||||
functions = "".join(wait_functions())
|
||||
out = subprocess.run(["bash", "-c", "set -u\n" + functions +
|
||||
'if vkbridge_wait_socket "" 10000; then echo USABLE; else echo FALLBACK; fi\n'],
|
||||
capture_output=True, text=True, timeout=10, check=True).stdout
|
||||
self.assertEqual("FALLBACK\n", out)
|
||||
|
||||
|
||||
class VkBridgeSessionCheckTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.text = SESSION.read_text()
|
||||
match = re.search(r'^if \[ "\$\{BL_VKBRIDGE:-0\}" = 1 \]; then\n.*?^fi\n', self.text, re.M | re.S)
|
||||
self.assertIsNotNone(match)
|
||||
self.block = match.group(0)
|
||||
|
||||
def test_the_first_pass_waits_before_the_usability_check(self):
|
||||
wait = self.block.index("vkbridge_wait_socket")
|
||||
check = self.block.index('[ -S "${VKBRIDGE_SOCKET:-}" ]')
|
||||
self.assertLess(wait, check)
|
||||
self.assertIn('[ -z "${BL_INSIDE:-}" ] && vkbridge_wait_socket', self.block)
|
||||
|
||||
def test_the_fallback_message_names_what_is_missing(self):
|
||||
self.assertIn("Mali bridge requested but NOT usable", self.block)
|
||||
self.assertIn("missing:$bl_vkb_missing", self.block)
|
||||
|
||||
def test_a_stop_ends_the_wait(self):
|
||||
self.assertRegex(self.text, r"trap '[^']*bl_stopping=1[^']*' TERM INT HUP")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -0,0 +1,48 @@
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
SESSION = Path(__file__).resolve().parents[1] / "linuxfs/overlay/usr/local/bin/droiddeck-session"
|
||||
KEYS = ("BL_VKBRIDGE_WEBHELPER_ARGS", "BL_VKBRIDGE_CEF_ANGLE", "BL_VKBRIDGE_CEF_VULKAN")
|
||||
|
||||
|
||||
def layout_function():
|
||||
match = re.search(r"^bl_webhelper_layout\(\) \{\n.*?^\}\n", SESSION.read_text(), re.M | re.S)
|
||||
return match.group(0) if match else None
|
||||
|
||||
|
||||
class WebhelperLayoutTest(unittest.TestCase):
|
||||
def layout(self, **settings):
|
||||
function = layout_function()
|
||||
self.assertIsNotNone(function, "droiddeck-session lacks bl_webhelper_layout()")
|
||||
env = {k: v for k, v in os.environ.items() if k not in KEYS}
|
||||
env.update(settings)
|
||||
return subprocess.run(["bash", "-c", "set -u\n" + function + "bl_webhelper_layout\n"], env=env,
|
||||
capture_output=True, text=True, check=True).stdout.strip()
|
||||
|
||||
def test_unset_keeps_steams_own_layout(self):
|
||||
self.assertEqual(self.layout(), "stock")
|
||||
|
||||
def test_angle_on_vulkan_brings_chromiums_vulkan_compositing(self):
|
||||
self.assertEqual(self.layout(BL_VKBRIDGE_CEF_ANGLE="vulkan"),
|
||||
"--use-gl=angle --use-angle=vulkan +Vulkan +VulkanFromANGLE +DefaultANGLEVulkan")
|
||||
|
||||
def test_vulkan_compositing_can_be_left_off(self):
|
||||
self.assertEqual(self.layout(BL_VKBRIDGE_CEF_ANGLE="vulkan", BL_VKBRIDGE_CEF_VULKAN="0"),
|
||||
"--use-gl=angle --use-angle=vulkan")
|
||||
|
||||
def test_other_angle_backends_get_only_the_angle_switches(self):
|
||||
self.assertEqual(self.layout(BL_VKBRIDGE_CEF_ANGLE="gl"), "--use-gl=angle --use-angle=gl")
|
||||
|
||||
def test_explicit_layout_wins(self):
|
||||
self.assertEqual(self.layout(BL_VKBRIDGE_CEF_ANGLE="vulkan", BL_VKBRIDGE_WEBHELPER_ARGS="--x +Y"),
|
||||
"--x +Y")
|
||||
|
||||
def test_the_steam_block_uses_it(self):
|
||||
self.assertIn("BL_WEBHELPER_ARGS=$(bl_webhelper_layout)", SESSION.read_text())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -61,6 +61,19 @@ class WebhelperPreloadTest(unittest.TestCase):
|
||||
args = [WEBHELPER, "--enable-features=A"]
|
||||
self.assertEqual(self.argv(*args, spec="stock"), args)
|
||||
|
||||
def test_angle_switches_are_appended_with_the_gpu_process_kept_out_of_process(self):
|
||||
out = self.argv(WEBHELPER, "-lang=en_US", "--enable-features=A", spec="--use-gl=angle --use-angle=vulkan")
|
||||
self.assertEqual(out, [WEBHELPER, "-lang=en_US", "--use-gl=angle", "--use-angle=vulkan",
|
||||
"--enable-features=A"])
|
||||
self.assertNotIn("--in-process-gpu", out)
|
||||
|
||||
def test_vulkan_compositing_features_join_steams_feature_list(self):
|
||||
out = self.argv(WEBHELPER, "--enable-features=PlatformHEVCDecoderSupport,V4L2VideoDecode",
|
||||
spec="--use-gl=angle --use-angle=vulkan +Vulkan +VulkanFromANGLE +DefaultANGLEVulkan")
|
||||
self.assertEqual(out, [WEBHELPER, "--use-gl=angle", "--use-angle=vulkan",
|
||||
"--enable-features=PlatformHEVCDecoderSupport,V4L2VideoDecode,"
|
||||
"Vulkan,VulkanFromANGLE,DefaultANGLEVulkan"])
|
||||
|
||||
def test_an_empty_setting_means_the_default(self):
|
||||
self.assertIn("--no-zygote", self.argv(WEBHELPER, spec=""))
|
||||
|
||||
|
||||
Reference in new issue
Block a user