From cd350c2dd1b447f09f2738b0bd6112ff5fcf0274 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Mon, 14 Jul 2025 15:59:08 -0400 Subject: Add lossless logo and update remote binary URL and hash in package.json --- assets/decky-lossless-logo.png | Bin 0 -> 132198 bytes package.json | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 assets/decky-lossless-logo.png diff --git a/assets/decky-lossless-logo.png b/assets/decky-lossless-logo.png new file mode 100644 index 0000000..f8678aa Binary files /dev/null and b/assets/decky-lossless-logo.png differ diff --git a/package.json b/package.json index 4c285df..1a7acd0 100644 --- a/package.json +++ b/package.json @@ -43,8 +43,8 @@ "remote_binary": [ { "name": "lsfg-vk_archlinux.zip", - "url": "https://github.com/xXJSONDeruloXx/lsfg-vk/releases/download/upstream-16241554722/lsfg-vk_archlinux.zip", - "sha256hash": "46f3ea5e8e01d0f1c52310f9f0918ee9229c89dc1e901788219662d7e7a3e99a" + "url": "https://github.com/xXJSONDeruloXx/lsfg-vk/releases/download/latest/lsfg-vk_archlinux.zip", + "sha256hash": "7409f91a717d17d77c90eec161652dcc26a6fab333b253a9e095e451ad81bbab" } ], "pnpm": { -- cgit v1.2.3 From db2b7370822de48a9e59a2bf1c6ce928447c6293 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Mon, 14 Jul 2025 17:31:08 -0400 Subject: static bin not rolling latest --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1a7acd0..e3a280e 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "remote_binary": [ { "name": "lsfg-vk_archlinux.zip", - "url": "https://github.com/xXJSONDeruloXx/lsfg-vk/releases/download/latest/lsfg-vk_archlinux.zip", + "url": "https://github.com/xXJSONDeruloXx/lsfg-vk/releases/download/upstream-16274840875/lsfg-vk_archlinux.zip", "sha256hash": "7409f91a717d17d77c90eec161652dcc26a6fab333b253a9e095e451ad81bbab" } ], -- cgit v1.2.3 From 858e7e7beb3748ebbbbc066af0fbde0379b8eef6 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Mon, 14 Jul 2025 19:32:35 -0400 Subject: bump plugin ver --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e3a280e..f82480d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lossless-scaling-vk", - "version": "0.2.0", - "description": "Use Lossless Scaling on the Steam Deck using the lsfg-vk compatibility layer", + "version": "0.2.1", + "description": "Use Lossless Scaling on the Steam Deck using the lsfg-vk vulkan layer", "type": "module", "scripts": { "build": "rollup -c", -- cgit v1.2.3 From 9a679fc4b70dad9c4894b7886d62ad41d0596251 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Mon, 14 Jul 2025 20:57:57 -0400 Subject: dynamic option 2 var display --- README.md | 2 +- src/components/Content.tsx | 2 +- src/components/UsageInstructions.tsx | 58 +++++++++++++++++++++++++----------- 3 files changed, 43 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 0f6d4da..d2f755d 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ A Decky plugin that streamlines the installation of **lsfg-vk** ([Lossless Scali 3. **Click "Install lsfg-vk"** to automatically set up the lsfg-vk vulkan layer 4. **Configure settings** using the plugin's UI. 5. **Apply launch commands** to the game you want to use frame generation with: - - **Option 1 (Recommended)**: `~/lsfg %COMMAND%` - Uses your plugin configuration + - **Option 1 (Recommended)**: `~/lsfg %command%` - Uses your plugin configuration - **Option 2**: Manual environment variables like `ENABLE_LSFG=1 LSFG_MULTIPLIER=2 %COMMAND%` - 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 diff --git a/src/components/Content.tsx b/src/components/Content.tsx index cecb142..0e17f3c 100644 --- a/src/components/Content.tsx +++ b/src/components/Content.tsx @@ -102,7 +102,7 @@ export function Content() { /> )} - + ); } diff --git a/src/components/UsageInstructions.tsx b/src/components/UsageInstructions.tsx index 712d4c1..3df3d78 100644 --- a/src/components/UsageInstructions.tsx +++ b/src/components/UsageInstructions.tsx @@ -1,10 +1,47 @@ import { PanelSectionRow } from "@decky/ui"; -interface UsageInstructionsProps { +interface ConfigType { + enableLsfg: boolean; multiplier: number; + flowScale: number; + hdr: boolean; + perfMode: boolean; + immediateMode: boolean; } -export function UsageInstructions({ multiplier }: UsageInstructionsProps) { +interface UsageInstructionsProps { + config: ConfigType; +} + +export function UsageInstructions({ config }: UsageInstructionsProps) { + // Build manual environment variables string based on current config + const buildManualEnvVars = (): string => { + const envVars: string[] = []; + + if (config.enableLsfg) { + envVars.push("ENABLE_LSFG=1"); + } + + // Always include multiplier and flow_scale if LSFG is enabled, as they have defaults + if (config.enableLsfg) { + envVars.push(`LSFG_MULTIPLIER=${config.multiplier}`); + envVars.push(`LSFG_FLOW_SCALE=${config.flowScale}`); + } + + if (config.hdr) { + envVars.push("LSFG_HDR=1"); + } + + if (config.perfMode) { + envVars.push("LSFG_PERF_MODE=1"); + } + + if (config.immediateMode) { + envVars.push("MESA_VK_WSI_PRESENT_MODE=immediate"); + } + + return envVars.length > 0 ? `${envVars.join(" ")} %command%` : "%command%"; + }; return (
- ~/lsfg %COMMAND% + ~/lsfg %command%
Option 2: Manual environment variables: @@ -47,20 +84,7 @@ export function UsageInstructions({ multiplier }: UsageInstructionsProps) { marginBottom: "6px" }} > - ENABLE_LSFG=1 LSFG_MULTIPLIER={multiplier} %COMMAND% -
-
- The lsfg script uses your current configuration settings. -
- • ENABLE_LSFG=1 - Enables frame generation -
- • LSFG_MULTIPLIER=2-4 - FPS multiplier (start with 2) -
- • LSFG_FLOW_SCALE=0.25-1.0 - Flow scale (for performance) -
- • LSFG_HDR=1 - HDR mode (only if using HDR) -
- • MESA_VK_WSI_PRESENT_MODE=immediate - Disable vsync + {buildManualEnvVars()}
-- cgit v1.2.3 From e961c485167802c32a69482a262349dead4d4f2e Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Mon, 14 Jul 2025 20:58:55 -0400 Subject: bump plugin version as feature tier --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f82480d..d8221cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lossless-scaling-vk", - "version": "0.2.1", + "version": "0.3.0", "description": "Use Lossless Scaling on the Steam Deck using the lsfg-vk vulkan layer", "type": "module", "scripts": { -- cgit v1.2.3 From 885b9a938f9c5193ab0259502d4f63e981fc4a26 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Mon, 14 Jul 2025 22:50:42 -0400 Subject: launch wiki in steam browser button --- src/components/UsageInstructions.tsx | 100 +++++++++++++++++++++-------------- 1 file changed, 60 insertions(+), 40 deletions(-) diff --git a/src/components/UsageInstructions.tsx b/src/components/UsageInstructions.tsx index 3df3d78..277f685 100644 --- a/src/components/UsageInstructions.tsx +++ b/src/components/UsageInstructions.tsx @@ -1,4 +1,5 @@ -import { PanelSectionRow } from "@decky/ui"; +import { PanelSectionRow, ButtonItem } from "@decky/ui"; +import { FaExternalLinkAlt } from "react-icons/fa"; interface ConfigType { enableLsfg: boolean; @@ -42,51 +43,70 @@ export function UsageInstructions({ config }: UsageInstructionsProps) { return envVars.length > 0 ? `${envVars.join(" ")} %command%` : "%command%"; }; + + const handleWikiClick = () => { + window.open("https://github.com/PancakeTAS/lsfg-vk/wiki", "_blank"); + }; + return ( - -
-
- Usage Instructions: -
-
- Option 1: Use the lsfg script (recommended): -
+ <> +
- ~/lsfg %command% -
-
- Option 2: Manual environment variables: +
+ Usage Instructions: +
+
+ Option 1: Use the lsfg script (recommended): +
+
+ ~/lsfg %command% +
+
+ Option 2: Manual environment variables: +
+
+ {buildManualEnvVars()} +
-
+ + + - {buildManualEnvVars()} -
-
-
+
+ +
LSFG-VK Wiki
+
+ + + ); } -- cgit v1.2.3 From 171959709a49899bdd1555cd07de1ab323a18ddb Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Mon, 14 Jul 2025 22:57:38 -0400 Subject: separate wiki button into component --- src/components/UsageInstructions.tsx | 20 +++----------------- src/components/WikiButton.tsx | 22 ++++++++++++++++++++++ src/components/index.ts | 1 + 3 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 src/components/WikiButton.tsx diff --git a/src/components/UsageInstructions.tsx b/src/components/UsageInstructions.tsx index 277f685..a826d3d 100644 --- a/src/components/UsageInstructions.tsx +++ b/src/components/UsageInstructions.tsx @@ -1,5 +1,5 @@ -import { PanelSectionRow, ButtonItem } from "@decky/ui"; -import { FaExternalLinkAlt } from "react-icons/fa"; +import { PanelSectionRow } from "@decky/ui"; +import { WikiButton } from "./WikiButton"; interface ConfigType { enableLsfg: boolean; @@ -44,10 +44,6 @@ export function UsageInstructions({ config }: UsageInstructionsProps) { return envVars.length > 0 ? `${envVars.join(" ")} %command%` : "%command%"; }; - const handleWikiClick = () => { - window.open("https://github.com/PancakeTAS/lsfg-vk/wiki", "_blank"); - }; - return ( <> @@ -96,17 +92,7 @@ export function UsageInstructions({ config }: UsageInstructionsProps) { - - -
- -
LSFG-VK Wiki
-
-
-
+ ); } diff --git a/src/components/WikiButton.tsx b/src/components/WikiButton.tsx new file mode 100644 index 0000000..80ff1d9 --- /dev/null +++ b/src/components/WikiButton.tsx @@ -0,0 +1,22 @@ +import { PanelSectionRow, ButtonItem } from "@decky/ui"; +import { FaExternalLinkAlt } from "react-icons/fa"; + +export function WikiButton() { + const handleWikiClick = () => { + window.open("https://github.com/PancakeTAS/lsfg-vk/wiki", "_blank"); + }; + + return ( + + +
+ +
LSFG-VK Wiki
+
+
+
+ ); +} diff --git a/src/components/index.ts b/src/components/index.ts index 77f11d4..26eb2fb 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -3,3 +3,4 @@ export { StatusDisplay } from "./StatusDisplay"; export { InstallationButton } from "./InstallationButton"; export { ConfigurationSection } from "./ConfigurationSection"; export { UsageInstructions } from "./UsageInstructions"; +export { WikiButton } from "./WikiButton"; -- cgit v1.2.3 From 312f048988c37a0692b450f5f1b0600522967d21 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Tue, 15 Jul 2025 12:14:31 -0400 Subject: default flow to 80%, perf mode on --- py_modules/lsfg_vk/constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py_modules/lsfg_vk/constants.py b/py_modules/lsfg_vk/constants.py index 28246c2..ceaf12b 100644 --- a/py_modules/lsfg_vk/constants.py +++ b/py_modules/lsfg_vk/constants.py @@ -47,8 +47,8 @@ ENV_HOME = "HOME" # Default configuration values DEFAULT_MULTIPLIER = 2 -DEFAULT_FLOW_SCALE = 1.0 +DEFAULT_FLOW_SCALE = 0.8 DEFAULT_ENABLE_LSFG = True DEFAULT_HDR = False -DEFAULT_PERF_MODE = False +DEFAULT_PERF_MODE = True DEFAULT_IMMEDIATE_MODE = False -- cgit v1.2.3 From 38809b6bbebbf734b11f9daa40f49ea9ed7b0505 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Tue, 15 Jul 2025 12:17:12 -0400 Subject: align ui toggles w new defaults --- src/hooks/useLsfgHooks.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/useLsfgHooks.ts b/src/hooks/useLsfgHooks.ts index 76acd33..d9b1406 100644 --- a/src/hooks/useLsfgHooks.ts +++ b/src/hooks/useLsfgHooks.ts @@ -72,9 +72,9 @@ export function useDllDetection() { export function useLsfgConfig() { const [enableLsfg, setEnableLsfg] = useState(true); const [multiplier, setMultiplier] = useState(2); - const [flowScale, setFlowScale] = useState(1.0); + const [flowScale, setFlowScale] = useState(0.8); const [hdr, setHdr] = useState(false); - const [perfMode, setPerfMode] = useState(false); + const [perfMode, setPerfMode] = useState(true); const [immediateMode, setImmediateMode] = useState(false); const loadLsfgConfig = async () => { -- cgit v1.2.3 From 192c6ece06e1a400ca3a559f47001324150a96ea Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Tue, 15 Jul 2025 12:17:33 -0400 Subject: bump ver --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d8221cb..a887953 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lossless-scaling-vk", - "version": "0.3.0", + "version": "0.3.1", "description": "Use Lossless Scaling on the Steam Deck using the lsfg-vk vulkan layer", "type": "module", "scripts": { -- cgit v1.2.3 From ec4541dd78f4e2a58b679b20740f323d8ce76698 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Tue, 15 Jul 2025 13:11:06 -0400 Subject: add disable_vkbasalt=1 defaulted, hidden ui to expose to users later if desired --- py_modules/lsfg_vk/configuration.py | 21 +++++++++++++++------ py_modules/lsfg_vk/constants.py | 2 ++ py_modules/lsfg_vk/installation.py | 5 +++-- py_modules/lsfg_vk/plugin.py | 5 +++-- py_modules/lsfg_vk/types.py | 1 + src/api/lsfgApi.ts | 3 ++- src/components/ConfigurationSection.tsx | 14 +++++++++++++- src/components/Content.tsx | 18 ++++++++++++------ src/components/UsageInstructions.tsx | 5 +++++ src/hooks/useLsfgHooks.ts | 14 ++++++++++---- 10 files changed, 66 insertions(+), 22 deletions(-) diff --git a/py_modules/lsfg_vk/configuration.py b/py_modules/lsfg_vk/configuration.py index f5e2981..cf3c9a3 100644 --- a/py_modules/lsfg_vk/configuration.py +++ b/py_modules/lsfg_vk/configuration.py @@ -66,7 +66,8 @@ class ConfigurationService(BaseService): "flow_scale": 1.0, "hdr": False, "perf_mode": False, - "immediate_mode": False + "immediate_mode": False, + "disable_vkbasalt": False } lines = content.split('\n') @@ -102,11 +103,15 @@ class ConfigurationService(BaseService): # Parse MESA_VK_WSI_PRESENT_MODE elif match := re.match(r'^(#\s*)?export\s+MESA_VK_WSI_PRESENT_MODE=([^\s#]+)', line): config["immediate_mode"] = not bool(match.group(1)) and match.group(2) == 'immediate' + + # Parse DISABLE_VKBASALT + elif match := re.match(r'^(#\s*)?export\s+DISABLE_VKBASALT=(\d+)', line): + config["disable_vkbasalt"] = not bool(match.group(1)) and match.group(2) == '1' return config def update_config(self, enable_lsfg: bool, multiplier: int, flow_scale: float, - hdr: bool, perf_mode: bool, immediate_mode: bool) -> ConfigurationResponse: + hdr: bool, perf_mode: bool, immediate_mode: bool, disable_vkbasalt: bool) -> ConfigurationResponse: """Update lsfg script configuration Args: @@ -116,6 +121,7 @@ class ConfigurationService(BaseService): hdr: Whether to enable HDR perf_mode: Whether to enable performance mode immediate_mode: Whether to enable immediate present mode (disable vsync) + disable_vkbasalt: Whether to disable vkbasalt layer Returns: ConfigurationResponse with success status @@ -123,7 +129,7 @@ class ConfigurationService(BaseService): try: # Generate script content using template script_content = self._generate_script_content( - enable_lsfg, multiplier, flow_scale, hdr, perf_mode, immediate_mode + enable_lsfg, multiplier, flow_scale, hdr, perf_mode, immediate_mode, disable_vkbasalt ) # Write the updated script atomically @@ -131,7 +137,8 @@ class ConfigurationService(BaseService): self.log.info(f"Updated lsfg script configuration: enable={enable_lsfg}, " f"multiplier={multiplier}, flow_scale={flow_scale}, hdr={hdr}, " - f"perf_mode={perf_mode}, immediate_mode={immediate_mode}") + f"perf_mode={perf_mode}, immediate_mode={immediate_mode}, " + f"disable_vkbasalt={disable_vkbasalt}") return { "success": True, @@ -151,7 +158,7 @@ class ConfigurationService(BaseService): } def _generate_script_content(self, enable_lsfg: bool, multiplier: int, flow_scale: float, - hdr: bool, perf_mode: bool, immediate_mode: bool) -> str: + hdr: bool, perf_mode: bool, immediate_mode: bool, disable_vkbasalt: bool) -> str: """Generate script content from configuration parameters Args: @@ -161,6 +168,7 @@ class ConfigurationService(BaseService): hdr: Whether to enable HDR perf_mode: Whether to enable performance mode immediate_mode: Whether to enable immediate present mode + disable_vkbasalt: Whether to disable vkbasalt layer Returns: Generated script content @@ -171,5 +179,6 @@ class ConfigurationService(BaseService): flow_scale=flow_scale, hdr="export LSFG_HDR=1" if hdr else "# export LSFG_HDR=1", perf_mode="export LSFG_PERF_MODE=1" if perf_mode else "# export LSFG_PERF_MODE=1", - immediate_mode="export MESA_VK_WSI_PRESENT_MODE=immediate # - disable vsync" if immediate_mode else "# export MESA_VK_WSI_PRESENT_MODE=immediate # - disable vsync" + immediate_mode="export MESA_VK_WSI_PRESENT_MODE=immediate # - disable vsync" if immediate_mode else "# export MESA_VK_WSI_PRESENT_MODE=immediate # - disable vsync", + disable_vkbasalt="export DISABLE_VKBASALT=1" if disable_vkbasalt else "# export DISABLE_VKBASALT=1" ) diff --git a/py_modules/lsfg_vk/constants.py b/py_modules/lsfg_vk/constants.py index ceaf12b..2440d9d 100644 --- a/py_modules/lsfg_vk/constants.py +++ b/py_modules/lsfg_vk/constants.py @@ -35,6 +35,7 @@ export LSFG_FLOW_SCALE={flow_scale} {hdr} {perf_mode} {immediate_mode} +{disable_vkbasalt} # Execute the passed command with the environment variables set exec "$@" @@ -52,3 +53,4 @@ DEFAULT_ENABLE_LSFG = True DEFAULT_HDR = False DEFAULT_PERF_MODE = True DEFAULT_IMMEDIATE_MODE = False +DEFAULT_DISABLE_VKBASALT = True diff --git a/py_modules/lsfg_vk/installation.py b/py_modules/lsfg_vk/installation.py index 1d0e96f..4e02091 100644 --- a/py_modules/lsfg_vk/installation.py +++ b/py_modules/lsfg_vk/installation.py @@ -14,7 +14,7 @@ from .constants import ( LIB_FILENAME, JSON_FILENAME, ZIP_FILENAME, BIN_DIR, SO_EXT, JSON_EXT, LSFG_SCRIPT_TEMPLATE, DEFAULT_MULTIPLIER, DEFAULT_FLOW_SCALE, DEFAULT_ENABLE_LSFG, - DEFAULT_HDR, DEFAULT_PERF_MODE, DEFAULT_IMMEDIATE_MODE + DEFAULT_HDR, DEFAULT_PERF_MODE, DEFAULT_IMMEDIATE_MODE, DEFAULT_DISABLE_VKBASALT ) from .types import InstallationResponse, UninstallationResponse, InstallationCheckResponse @@ -111,7 +111,8 @@ class InstallationService(BaseService): flow_scale=DEFAULT_FLOW_SCALE, hdr="export LSFG_HDR=1" if DEFAULT_HDR else "# export LSFG_HDR=1", perf_mode="export LSFG_PERF_MODE=1" if DEFAULT_PERF_MODE else "# export LSFG_PERF_MODE=1", - 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" + 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", + disable_vkbasalt="export DISABLE_VKBASALT=1" if DEFAULT_DISABLE_VKBASALT else "# export DISABLE_VKBASALT=1" ) # Use atomic write to prevent corruption diff --git a/py_modules/lsfg_vk/plugin.py b/py_modules/lsfg_vk/plugin.py index 000830f..5fb6c8f 100644 --- a/py_modules/lsfg_vk/plugin.py +++ b/py_modules/lsfg_vk/plugin.py @@ -73,7 +73,7 @@ class Plugin: return self.configuration_service.get_config() async def update_lsfg_config(self, enable_lsfg: bool, multiplier: int, flow_scale: float, - hdr: bool, perf_mode: bool, immediate_mode: bool) -> Dict[str, Any]: + hdr: bool, perf_mode: bool, immediate_mode: bool, disable_vkbasalt: bool) -> Dict[str, Any]: """Update lsfg script configuration Args: @@ -83,12 +83,13 @@ class Plugin: hdr: Whether to enable HDR perf_mode: Whether to enable performance mode immediate_mode: Whether to enable immediate present mode (disable vsync) + disable_vkbasalt: Whether to disable vkbasalt layer Returns: ConfigurationResponse dict with success status """ return self.configuration_service.update_config( - enable_lsfg, multiplier, flow_scale, hdr, perf_mode, immediate_mode + enable_lsfg, multiplier, flow_scale, hdr, perf_mode, immediate_mode, disable_vkbasalt ) # Plugin lifecycle methods diff --git a/py_modules/lsfg_vk/types.py b/py_modules/lsfg_vk/types.py index f0ec892..07dd768 100644 --- a/py_modules/lsfg_vk/types.py +++ b/py_modules/lsfg_vk/types.py @@ -62,6 +62,7 @@ class ConfigurationData(TypedDict): hdr: bool perf_mode: bool immediate_mode: bool + disable_vkbasalt: bool class ConfigurationResponse(BaseResponse): diff --git a/src/api/lsfgApi.ts b/src/api/lsfgApi.ts index a35f274..0a0b502 100644 --- a/src/api/lsfgApi.ts +++ b/src/api/lsfgApi.ts @@ -34,6 +34,7 @@ export interface LsfgConfig { hdr: boolean; perf_mode: boolean; immediate_mode: boolean; + disable_vkbasalt: boolean; } export interface ConfigResult { @@ -55,6 +56,6 @@ export const checkLsfgVkInstalled = callable<[], InstallationStatus>("check_lsfg export const checkLosslessScalingDll = callable<[], DllDetectionResult>("check_lossless_scaling_dll"); export const getLsfgConfig = callable<[], ConfigResult>("get_lsfg_config"); export const updateLsfgConfig = callable< - [boolean, number, number, boolean, boolean, boolean], + [boolean, number, number, boolean, boolean, boolean, boolean], ConfigUpdateResult >("update_lsfg_config"); diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx index ee18e5b..34955f8 100644 --- a/src/components/ConfigurationSection.tsx +++ b/src/components/ConfigurationSection.tsx @@ -7,6 +7,7 @@ interface LsfgConfig { hdr: boolean; perfMode: boolean; immediateMode: boolean; + disableVkbasalt: boolean; } interface ConfigurationSectionProps { @@ -17,6 +18,7 @@ interface ConfigurationSectionProps { onHdrChange: (value: boolean) => Promise; onPerfModeChange: (value: boolean) => Promise; onImmediateModeChange: (value: boolean) => Promise; + onDisableVkbasaltChange: (value: boolean) => Promise; } export function ConfigurationSection({ @@ -26,7 +28,8 @@ export function ConfigurationSection({ onFlowScaleChange, onHdrChange, onPerfModeChange, - onImmediateModeChange + onImmediateModeChange, + onDisableVkbasaltChange }: ConfigurationSectionProps) { return ( <> @@ -110,6 +113,15 @@ export function ConfigurationSection({ onChange={onImmediateModeChange} /> + + {/* + + */} ); } diff --git a/src/components/Content.tsx b/src/components/Content.tsx index 0e17f3c..16c8f2f 100644 --- a/src/components/Content.tsx +++ b/src/components/Content.tsx @@ -36,32 +36,37 @@ export function Content() { // Configuration change handlers const handleEnableLsfgChange = async (value: boolean) => { setters.setEnableLsfg(value); - await updateConfig(value, config.multiplier, config.flowScale, config.hdr, config.perfMode, config.immediateMode); + await updateConfig(value, config.multiplier, config.flowScale, config.hdr, config.perfMode, config.immediateMode, config.disableVkbasalt); }; const handleMultiplierChange = async (value: number) => { setters.setMultiplier(value); - await updateConfig(config.enableLsfg, value, config.flowScale, config.hdr, config.perfMode, config.immediateMode); + await updateConfig(config.enableLsfg, value, config.flowScale, config.hdr, config.perfMode, config.immediateMode, config.disableVkbasalt); }; const handleFlowScaleChange = async (value: number) => { setters.setFlowScale(value); - await updateConfig(config.enableLsfg, config.multiplier, value, config.hdr, config.perfMode, config.immediateMode); + await updateConfig(config.enableLsfg, config.multiplier, value, config.hdr, config.perfMode, config.immediateMode, config.disableVkbasalt); }; const handleHdrChange = async (value: boolean) => { setters.setHdr(value); - await updateConfig(config.enableLsfg, config.multiplier, config.flowScale, value, config.perfMode, config.immediateMode); + await updateConfig(config.enableLsfg, config.multiplier, config.flowScale, value, config.perfMode, config.immediateMode, config.disableVkbasalt); }; const handlePerfModeChange = async (value: boolean) => { setters.setPerfMode(value); - await updateConfig(config.enableLsfg, config.multiplier, config.flowScale, config.hdr, value, config.immediateMode); + await updateConfig(config.enableLsfg, config.multiplier, config.flowScale, config.hdr, value, config.immediateMode, config.disableVkbasalt); }; const handleImmediateModeChange = async (value: boolean) => { setters.setImmediateMode(value); - await updateConfig(config.enableLsfg, config.multiplier, config.flowScale, config.hdr, config.perfMode, value); + await updateConfig(config.enableLsfg, config.multiplier, config.flowScale, config.hdr, config.perfMode, value, config.disableVkbasalt); + }; + + const handleDisableVkbasaltChange = async (value: boolean) => { + setters.setDisableVkbasalt(value); + await updateConfig(config.enableLsfg, config.multiplier, config.flowScale, config.hdr, config.perfMode, config.immediateMode, value); }; const onInstall = () => { @@ -99,6 +104,7 @@ export function Content() { onHdrChange={handleHdrChange} onPerfModeChange={handlePerfModeChange} onImmediateModeChange={handleImmediateModeChange} + onDisableVkbasaltChange={handleDisableVkbasaltChange} /> )} diff --git a/src/components/UsageInstructions.tsx b/src/components/UsageInstructions.tsx index a826d3d..ca9ddd2 100644 --- a/src/components/UsageInstructions.tsx +++ b/src/components/UsageInstructions.tsx @@ -8,6 +8,7 @@ interface ConfigType { hdr: boolean; perfMode: boolean; immediateMode: boolean; + disableVkbasalt: boolean; } interface UsageInstructionsProps { @@ -41,6 +42,10 @@ export function UsageInstructions({ config }: UsageInstructionsProps) { envVars.push("MESA_VK_WSI_PRESENT_MODE=immediate"); } + if (config.disableVkbasalt) { + envVars.push("DISABLE_VKBASALT=1"); + } + return envVars.length > 0 ? `${envVars.join(" ")} %command%` : "%command%"; }; diff --git a/src/hooks/useLsfgHooks.ts b/src/hooks/useLsfgHooks.ts index d9b1406..c0bd8e8 100644 --- a/src/hooks/useLsfgHooks.ts +++ b/src/hooks/useLsfgHooks.ts @@ -76,6 +76,7 @@ export function useLsfgConfig() { const [hdr, setHdr] = useState(false); const [perfMode, setPerfMode] = useState(true); const [immediateMode, setImmediateMode] = useState(false); + const [disableVkbasalt, setDisableVkbasalt] = useState(true); const loadLsfgConfig = async () => { try { @@ -87,6 +88,7 @@ export function useLsfgConfig() { setHdr(result.config.hdr); setPerfMode(result.config.perf_mode); setImmediateMode(result.config.immediate_mode); + setDisableVkbasalt(result.config.disable_vkbasalt); console.log("Loaded lsfg config:", result.config); } else { console.log("lsfg config not available, using defaults:", result.error); @@ -102,7 +104,8 @@ export function useLsfgConfig() { newFlowScale: number, newHdr: boolean, newPerfMode: boolean, - newImmediateMode: boolean + newImmediateMode: boolean, + newDisableVkbasalt: boolean ): Promise => { try { const result = await updateLsfgConfig( @@ -111,7 +114,8 @@ export function useLsfgConfig() { newFlowScale, newHdr, newPerfMode, - newImmediateMode + newImmediateMode, + newDisableVkbasalt ); if (!result.success) { toaster.toast({ @@ -140,7 +144,8 @@ export function useLsfgConfig() { flowScale, hdr, perfMode, - immediateMode + immediateMode, + disableVkbasalt }, setters: { setEnableLsfg, @@ -148,7 +153,8 @@ export function useLsfgConfig() { setFlowScale, setHdr, setPerfMode, - setImmediateMode + setImmediateMode, + setDisableVkbasalt }, loadLsfgConfig, updateConfig -- cgit v1.2.3