summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.json5
-rw-r--r--py_modules/lsfg_vk/constants.py1
-rw-r--r--py_modules/lsfg_vk/installation.py18
3 files changed, 23 insertions, 1 deletions
diff --git a/package.json b/package.json
index 0791681..7d1ac8b 100644
--- a/package.json
+++ b/package.json
@@ -63,6 +63,11 @@
"name": "org.freedesktop.Platform.VulkanLayer.lsfg_vk_25.08.flatpak",
"url": "https://github.com/PancakeTAS/lsfg-vk/releases/download/v1.0.0/org.freedesktop.Platform.VulkanLayer.lsfg_vk_25.08.flatpak",
"sha256hash": "0651bda96751ef0f1314a5179585926a0cd354476790ca2616662c39fe6fae54"
+ },
+ {
+ "name": "liblsfg-vk-arm64.so",
+ "url": "https://github.com/xXJSONDeruloXx/lsfg-vk/releases/download/arm-test/liblsfg-vk.so",
+ "sha256hash": "c745893b3798eb1acb422775a43107fc3f2efb2ae2711090b90b04941d8de309"
}
],
"pnpm": {
diff --git a/py_modules/lsfg_vk/constants.py b/py_modules/lsfg_vk/constants.py
index 3d8e44a..795c1bf 100644
--- a/py_modules/lsfg_vk/constants.py
+++ b/py_modules/lsfg_vk/constants.py
@@ -14,6 +14,7 @@ CONFIG_FILENAME = "conf.toml"
LIB_FILENAME = "liblsfg-vk.so"
JSON_FILENAME = "VkLayer_LS_frame_generation.json"
ZIP_FILENAME = "lsfg-vk_noui.zip"
+ARM_LIB_FILENAME = "liblsfg-vk-arm64.so"
FLATPAK_23_08_FILENAME = "org.freedesktop.Platform.VulkanLayer.lsfg_vk_23.08.flatpak"
FLATPAK_24_08_FILENAME = "org.freedesktop.Platform.VulkanLayer.lsfg_vk_24.08.flatpak"
diff --git a/py_modules/lsfg_vk/installation.py b/py_modules/lsfg_vk/installation.py
index 4329d49..4f01be1 100644
--- a/py_modules/lsfg_vk/installation.py
+++ b/py_modules/lsfg_vk/installation.py
@@ -3,6 +3,7 @@ Installation service for lsfg-vk.
"""
import os
+import platform
import shutil
import traceback
import zipfile
@@ -14,7 +15,7 @@ from typing import Dict, Any
from .base_service import BaseService
from .constants import (
LIB_FILENAME, JSON_FILENAME, ZIP_FILENAME, BIN_DIR,
- SO_EXT, JSON_EXT
+ SO_EXT, JSON_EXT, ARM_LIB_FILENAME
)
from .config_schema import ConfigurationManager
from .types import InstallationResponse, UninstallationResponse, InstallationCheckResponse
@@ -48,6 +49,13 @@ class InstallationService(BaseService):
self._extract_and_install_files(zip_path)
+ # If on ARM, overwrite the .so with the ARM version
+ if self._is_arm_architecture():
+ self.log.info("Detected ARM architecture, using ARM binary")
+ arm_so_path = plugin_dir / BIN_DIR / ARM_LIB_FILENAME
+ shutil.copy2(arm_so_path, self.lib_file)
+ self.log.info(f"Overwrote with ARM binary: {self.lib_file}")
+
self._create_config_file()
self._create_lsfg_launch_script()
@@ -64,6 +72,14 @@ class InstallationService(BaseService):
self.log.error(error_msg)
return self._error_response(InstallationResponse, str(e), message="")
+ def _is_arm_architecture(self) -> bool:
+ """Check if running on ARM architecture
+
+ Returns:
+ True if running on ARM (aarch64), False otherwise
+ """
+ return platform.machine().lower() == 'aarch64'
+
def _extract_and_install_files(self, zip_path: Path) -> None:
"""Extract zip file and install files to appropriate locations