Skip to content

Commit 52b2b5f

Browse files
Merge pull request #14 from xXJSONDeruloXx/remote-bump
v0.3.1
2 parents 92cce33 + ec4541d commit 52b2b5f

15 files changed

Lines changed: 184 additions & 87 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ A Decky plugin that streamlines the installation of **lsfg-vk** ([Lossless Scali
2525
3. **Click "Install lsfg-vk"** to automatically set up the lsfg-vk vulkan layer
2626
4. **Configure settings** using the plugin's UI.
2727
5. **Apply launch commands** to the game you want to use frame generation with:
28-
- **Option 1 (Recommended)**: `~/lsfg %COMMAND%` - Uses your plugin configuration
28+
- **Option 1 (Recommended)**: `~/lsfg %command%` - Uses your plugin configuration
2929
- **Option 2**: Manual environment variables like `ENABLE_LSFG=1 LSFG_MULTIPLIER=2 %COMMAND%`
3030
- See the [LSFG-VK WIKI](https://github.com/PancakeTAS/lsfg-vk/wiki/Configuring-lsfg%E2%80%90vk) for more information on each available environment variable
3131

assets/decky-lossless-logo.png

129 KB
Loading

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "lossless-scaling-vk",
3-
"version": "0.2.0",
4-
"description": "Use Lossless Scaling on the Steam Deck using the lsfg-vk compatibility layer",
3+
"version": "0.3.1",
4+
"description": "Use Lossless Scaling on the Steam Deck using the lsfg-vk vulkan layer",
55
"type": "module",
66
"scripts": {
77
"build": "rollup -c",
@@ -43,8 +43,8 @@
4343
"remote_binary": [
4444
{
4545
"name": "lsfg-vk_archlinux.zip",
46-
"url": "https://github.com/xXJSONDeruloXx/lsfg-vk/releases/download/upstream-16241554722/lsfg-vk_archlinux.zip",
47-
"sha256hash": "46f3ea5e8e01d0f1c52310f9f0918ee9229c89dc1e901788219662d7e7a3e99a"
46+
"url": "https://github.com/xXJSONDeruloXx/lsfg-vk/releases/download/upstream-16274840875/lsfg-vk_archlinux.zip",
47+
"sha256hash": "7409f91a717d17d77c90eec161652dcc26a6fab333b253a9e095e451ad81bbab"
4848
}
4949
],
5050
"pnpm": {

py_modules/lsfg_vk/configuration.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ def _parse_script_content(self, content: str) -> ConfigurationData:
6666
"flow_scale": 1.0,
6767
"hdr": False,
6868
"perf_mode": False,
69-
"immediate_mode": False
69+
"immediate_mode": False,
70+
"disable_vkbasalt": False
7071
}
7172

7273
lines = content.split('\n')
@@ -102,11 +103,15 @@ def _parse_script_content(self, content: str) -> ConfigurationData:
102103
# Parse MESA_VK_WSI_PRESENT_MODE
103104
elif match := re.match(r'^(#\s*)?export\s+MESA_VK_WSI_PRESENT_MODE=([^\s#]+)', line):
104105
config["immediate_mode"] = not bool(match.group(1)) and match.group(2) == 'immediate'
106+
107+
# Parse DISABLE_VKBASALT
108+
elif match := re.match(r'^(#\s*)?export\s+DISABLE_VKBASALT=(\d+)', line):
109+
config["disable_vkbasalt"] = not bool(match.group(1)) and match.group(2) == '1'
105110

106111
return config
107112

108113
def update_config(self, enable_lsfg: bool, multiplier: int, flow_scale: float,
109-
hdr: bool, perf_mode: bool, immediate_mode: bool) -> ConfigurationResponse:
114+
hdr: bool, perf_mode: bool, immediate_mode: bool, disable_vkbasalt: bool) -> ConfigurationResponse:
110115
"""Update lsfg script configuration
111116
112117
Args:
@@ -116,22 +121,24 @@ def update_config(self, enable_lsfg: bool, multiplier: int, flow_scale: float,
116121
hdr: Whether to enable HDR
117122
perf_mode: Whether to enable performance mode
118123
immediate_mode: Whether to enable immediate present mode (disable vsync)
124+
disable_vkbasalt: Whether to disable vkbasalt layer
119125
120126
Returns:
121127
ConfigurationResponse with success status
122128
"""
123129
try:
124130
# Generate script content using template
125131
script_content = self._generate_script_content(
126-
enable_lsfg, multiplier, flow_scale, hdr, perf_mode, immediate_mode
132+
enable_lsfg, multiplier, flow_scale, hdr, perf_mode, immediate_mode, disable_vkbasalt
127133
)
128134

129135
# Write the updated script atomically
130136
self._atomic_write(self.lsfg_script_path, script_content, 0o755)
131137

132138
self.log.info(f"Updated lsfg script configuration: enable={enable_lsfg}, "
133139
f"multiplier={multiplier}, flow_scale={flow_scale}, hdr={hdr}, "
134-
f"perf_mode={perf_mode}, immediate_mode={immediate_mode}")
140+
f"perf_mode={perf_mode}, immediate_mode={immediate_mode}, "
141+
f"disable_vkbasalt={disable_vkbasalt}")
135142

136143
return {
137144
"success": True,
@@ -151,7 +158,7 @@ def update_config(self, enable_lsfg: bool, multiplier: int, flow_scale: float,
151158
}
152159

153160
def _generate_script_content(self, enable_lsfg: bool, multiplier: int, flow_scale: float,
154-
hdr: bool, perf_mode: bool, immediate_mode: bool) -> str:
161+
hdr: bool, perf_mode: bool, immediate_mode: bool, disable_vkbasalt: bool) -> str:
155162
"""Generate script content from configuration parameters
156163
157164
Args:
@@ -161,6 +168,7 @@ def _generate_script_content(self, enable_lsfg: bool, multiplier: int, flow_scal
161168
hdr: Whether to enable HDR
162169
perf_mode: Whether to enable performance mode
163170
immediate_mode: Whether to enable immediate present mode
171+
disable_vkbasalt: Whether to disable vkbasalt layer
164172
165173
Returns:
166174
Generated script content
@@ -171,5 +179,6 @@ def _generate_script_content(self, enable_lsfg: bool, multiplier: int, flow_scal
171179
flow_scale=flow_scale,
172180
hdr="export LSFG_HDR=1" if hdr else "# export LSFG_HDR=1",
173181
perf_mode="export LSFG_PERF_MODE=1" if perf_mode else "# export LSFG_PERF_MODE=1",
174-
immediate_mode="export MESA_VK_WSI_PRESENT_MODE=immediate # - disable vsync" if immediate_mode else "# export MESA_VK_WSI_PRESENT_MODE=immediate # - disable vsync"
182+
immediate_mode="export MESA_VK_WSI_PRESENT_MODE=immediate # - disable vsync" if immediate_mode else "# export MESA_VK_WSI_PRESENT_MODE=immediate # - disable vsync",
183+
disable_vkbasalt="export DISABLE_VKBASALT=1" if disable_vkbasalt else "# export DISABLE_VKBASALT=1"
175184
)

py_modules/lsfg_vk/constants.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
{hdr}
3636
{perf_mode}
3737
{immediate_mode}
38+
{disable_vkbasalt}
3839
3940
# Execute the passed command with the environment variables set
4041
exec "$@"
@@ -47,8 +48,9 @@
4748

4849
# Default configuration values
4950
DEFAULT_MULTIPLIER = 2
50-
DEFAULT_FLOW_SCALE = 1.0
51+
DEFAULT_FLOW_SCALE = 0.8
5152
DEFAULT_ENABLE_LSFG = True
5253
DEFAULT_HDR = False
53-
DEFAULT_PERF_MODE = False
54+
DEFAULT_PERF_MODE = True
5455
DEFAULT_IMMEDIATE_MODE = False
56+
DEFAULT_DISABLE_VKBASALT = True

py_modules/lsfg_vk/installation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
LIB_FILENAME, JSON_FILENAME, ZIP_FILENAME, BIN_DIR,
1515
SO_EXT, JSON_EXT, LSFG_SCRIPT_TEMPLATE,
1616
DEFAULT_MULTIPLIER, DEFAULT_FLOW_SCALE, DEFAULT_ENABLE_LSFG,
17-
DEFAULT_HDR, DEFAULT_PERF_MODE, DEFAULT_IMMEDIATE_MODE
17+
DEFAULT_HDR, DEFAULT_PERF_MODE, DEFAULT_IMMEDIATE_MODE, DEFAULT_DISABLE_VKBASALT
1818
)
1919
from .types import InstallationResponse, UninstallationResponse, InstallationCheckResponse
2020

@@ -111,7 +111,8 @@ def _create_lsfg_script(self) -> None:
111111
flow_scale=DEFAULT_FLOW_SCALE,
112112
hdr="export LSFG_HDR=1" if DEFAULT_HDR else "# export LSFG_HDR=1",
113113
perf_mode="export LSFG_PERF_MODE=1" if DEFAULT_PERF_MODE else "# export LSFG_PERF_MODE=1",
114-
immediate_mode="export MESA_VK_WSI_PRESENT_MODE=immediate # - disable vsync" if DEFAULT_IMMEDIATE_MODE else "# export MESA_VK_WSI_PRESENT_MODE=immediate # - disable vsync"
114+
immediate_mode="export MESA_VK_WSI_PRESENT_MODE=immediate # - disable vsync" if DEFAULT_IMMEDIATE_MODE else "# export MESA_VK_WSI_PRESENT_MODE=immediate # - disable vsync",
115+
disable_vkbasalt="export DISABLE_VKBASALT=1" if DEFAULT_DISABLE_VKBASALT else "# export DISABLE_VKBASALT=1"
115116
)
116117

117118
# Use atomic write to prevent corruption

py_modules/lsfg_vk/plugin.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ async def get_lsfg_config(self) -> Dict[str, Any]:
7373
return self.configuration_service.get_config()
7474

7575
async def update_lsfg_config(self, enable_lsfg: bool, multiplier: int, flow_scale: float,
76-
hdr: bool, perf_mode: bool, immediate_mode: bool) -> Dict[str, Any]:
76+
hdr: bool, perf_mode: bool, immediate_mode: bool, disable_vkbasalt: bool) -> Dict[str, Any]:
7777
"""Update lsfg script configuration
7878
7979
Args:
@@ -83,12 +83,13 @@ async def update_lsfg_config(self, enable_lsfg: bool, multiplier: int, flow_scal
8383
hdr: Whether to enable HDR
8484
perf_mode: Whether to enable performance mode
8585
immediate_mode: Whether to enable immediate present mode (disable vsync)
86+
disable_vkbasalt: Whether to disable vkbasalt layer
8687
8788
Returns:
8889
ConfigurationResponse dict with success status
8990
"""
9091
return self.configuration_service.update_config(
91-
enable_lsfg, multiplier, flow_scale, hdr, perf_mode, immediate_mode
92+
enable_lsfg, multiplier, flow_scale, hdr, perf_mode, immediate_mode, disable_vkbasalt
9293
)
9394

9495
# Plugin lifecycle methods

py_modules/lsfg_vk/types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class ConfigurationData(TypedDict):
6262
hdr: bool
6363
perf_mode: bool
6464
immediate_mode: bool
65+
disable_vkbasalt: bool
6566

6667

6768
class ConfigurationResponse(BaseResponse):

src/api/lsfgApi.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export interface LsfgConfig {
3434
hdr: boolean;
3535
perf_mode: boolean;
3636
immediate_mode: boolean;
37+
disable_vkbasalt: boolean;
3738
}
3839

3940
export interface ConfigResult {
@@ -55,6 +56,6 @@ export const checkLsfgVkInstalled = callable<[], InstallationStatus>("check_lsfg
5556
export const checkLosslessScalingDll = callable<[], DllDetectionResult>("check_lossless_scaling_dll");
5657
export const getLsfgConfig = callable<[], ConfigResult>("get_lsfg_config");
5758
export const updateLsfgConfig = callable<
58-
[boolean, number, number, boolean, boolean, boolean],
59+
[boolean, number, number, boolean, boolean, boolean, boolean],
5960
ConfigUpdateResult
6061
>("update_lsfg_config");

src/components/ConfigurationSection.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface LsfgConfig {
77
hdr: boolean;
88
perfMode: boolean;
99
immediateMode: boolean;
10+
disableVkbasalt: boolean;
1011
}
1112

1213
interface ConfigurationSectionProps {
@@ -17,6 +18,7 @@ interface ConfigurationSectionProps {
1718
onHdrChange: (value: boolean) => Promise<void>;
1819
onPerfModeChange: (value: boolean) => Promise<void>;
1920
onImmediateModeChange: (value: boolean) => Promise<void>;
21+
onDisableVkbasaltChange: (value: boolean) => Promise<void>;
2022
}
2123

2224
export function ConfigurationSection({
@@ -26,7 +28,8 @@ export function ConfigurationSection({
2628
onFlowScaleChange,
2729
onHdrChange,
2830
onPerfModeChange,
29-
onImmediateModeChange
31+
onImmediateModeChange,
32+
onDisableVkbasaltChange
3033
}: ConfigurationSectionProps) {
3134
return (
3235
<>
@@ -110,6 +113,15 @@ export function ConfigurationSection({
110113
onChange={onImmediateModeChange}
111114
/>
112115
</PanelSectionRow>
116+
117+
{/* <PanelSectionRow>
118+
<ToggleField
119+
label="Disable vkbasalt"
120+
description="Some plugins add vkbasalt layer, which can break lsfg. Toggling on fixes this"
121+
checked={config.disableVkbasalt}
122+
onChange={onDisableVkbasaltChange}
123+
/>
124+
</PanelSectionRow> */}
113125
</>
114126
);
115127
}

0 commit comments

Comments
 (0)