summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.json6
-rw-r--r--py_modules/lsfg_vk/config_schema.py30
-rw-r--r--py_modules/lsfg_vk/config_schema_generated.py10
-rw-r--r--py_modules/lsfg_vk/configuration_helpers_generated.py2
-rw-r--r--shared_config.py10
-rw-r--r--src/components/ConfigurationSection.tsx11
-rw-r--r--src/config/configSchema.ts2
-rw-r--r--src/config/generatedConfigSchema.ts14
8 files changed, 63 insertions, 22 deletions
diff --git a/package.json b/package.json
index 504c12c..b16186a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "decky-lossless-scaling-vk",
- "version": "0.8.1",
+ "version": "0.9.1",
"description": "Use Lossless Scaling on the Steam Deck using the lsfg-vk vulkan layer",
"type": "module",
"scripts": {
@@ -46,8 +46,8 @@
"remote_binary": [
{
"name": "lsfg-vk_noui.zip",
- "url": "https://github.com/PancakeTAS/lsfg-vk/releases/download/v1.0.0/lsfg-vk_noui.zip",
- "sha256hash": "af5ee1626d9543349245520689da107c3ebc5ef3755086441fbb854173b8e096"
+ "url": "https://github.com/xXJSONDeruloXx/lsfg-vk/releases/download/fp16-test-2/lsfg-vk_noui.zip",
+ "sha256hash": "a406b3730144c2011e2c2acd3cf44f3ec6c048ee86099bc9c3ac90aa1515e5ec"
}
],
"pnpm": {
diff --git a/py_modules/lsfg_vk/config_schema.py b/py_modules/lsfg_vk/config_schema.py
index bbace42..33f7b3e 100644
--- a/py_modules/lsfg_vk/config_schema.py
+++ b/py_modules/lsfg_vk/config_schema.py
@@ -167,14 +167,20 @@ class ConfigurationManager:
lines = ["version = 1"]
lines.append("")
- # Add global section with DLL path only (if specified)
+ # Add global section with global fields
+ lines.append("[global]")
+
+ # Add dll field if specified
if config.get("dll"):
- lines.append("[global]")
lines.append(f"# specify where Lossless.dll is stored")
- # Generate TOML lines for TOML fields only - USE GENERATED CONSTANTS
from .config_schema_generated import DLL
lines.append(f'dll = "{config[DLL]}"')
- lines.append("")
+
+ # Add no_fp16 field
+ from .config_schema_generated import NO_FP16
+ lines.append(f"# force-disable fp16 (use on older nvidia cards)")
+ lines.append(f"no_fp16 = {str(config[NO_FP16]).lower()}")
+ lines.append("")
# Add game section with process name for LSFG_PROCESS approach
lines.append("[[game]]")
@@ -184,8 +190,8 @@ class ConfigurationManager:
# Add all configuration fields to the game section
for field_name, field_def in CONFIG_SCHEMA.items():
- # Skip dll field - dll goes in global section
- if field_name == "dll":
+ # Skip global fields - they go in global section
+ if field_name in ("dll", "no_fp16"):
continue
value = config[field_name]
@@ -250,10 +256,14 @@ class ConfigurationManager:
elif value.startswith("'") and value.endswith("'"):
value = value[1:-1]
- # Handle global section (dll only) - USE GENERATED CONSTANTS
- if in_global_section and key == "dll":
- from .config_schema_generated import DLL
- config[DLL] = value
+ # Handle global section (dll and no_fp16) - USE GENERATED CONSTANTS
+ if in_global_section:
+ if key == "dll":
+ from .config_schema_generated import DLL
+ config[DLL] = value
+ elif key == "no_fp16":
+ from .config_schema_generated import NO_FP16
+ config[NO_FP16] = value.lower() in ('true', '1', 'yes', 'on')
# Handle game section
elif in_game_section:
diff --git a/py_modules/lsfg_vk/config_schema_generated.py b/py_modules/lsfg_vk/config_schema_generated.py
index 50d2a4f..4e701ac 100644
--- a/py_modules/lsfg_vk/config_schema_generated.py
+++ b/py_modules/lsfg_vk/config_schema_generated.py
@@ -14,6 +14,7 @@ from shared_config import CONFIG_SCHEMA_DEF, ConfigFieldType
# Field name constants for type-safe access
DLL = "dll"
+NO_FP16 = "no_fp16"
MULTIPLIER = "multiplier"
FLOW_SCALE = "flow_scale"
PERFORMANCE_MODE = "performance_mode"
@@ -31,6 +32,7 @@ ENABLE_WSI = "enable_wsi"
class ConfigurationData(TypedDict):
"""Type-safe configuration data structure - AUTO-GENERATED"""
dll: str
+ no_fp16: bool
multiplier: int
flow_scale: float
performance_mode: bool
@@ -108,9 +110,10 @@ def get_script_generation_logic():
def get_function_parameters() -> str:
"""Return function signature parameters"""
return """dll: str = "/games/Lossless Scaling/Lossless.dll",
+ no_fp16: bool = False,
multiplier: int = 1,
flow_scale: float = 0.8,
- performance_mode: bool = True,
+ performance_mode: bool = False,
hdr_mode: bool = False,
experimental_present_mode: str = "fifo",
dxvk_frame_rate: int = 0,
@@ -126,6 +129,7 @@ def create_config_dict(**kwargs) -> ConfigurationData:
"""Create configuration dictionary from keyword arguments"""
return cast(ConfigurationData, {
"dll": kwargs.get("dll"),
+ "no_fp16": kwargs.get("no_fp16"),
"multiplier": kwargs.get("multiplier"),
"flow_scale": kwargs.get("flow_scale"),
"performance_mode": kwargs.get("performance_mode"),
@@ -142,6 +146,6 @@ def create_config_dict(**kwargs) -> ConfigurationData:
# Field lists for dynamic operations
-TOML_FIELDS = ['dll', 'multiplier', 'flow_scale', 'performance_mode', 'hdr_mode', 'experimental_present_mode']
+TOML_FIELDS = ['dll', 'no_fp16', 'multiplier', 'flow_scale', 'performance_mode', 'hdr_mode', 'experimental_present_mode']
SCRIPT_FIELDS = ['dxvk_frame_rate', 'enable_wow64', 'disable_steamdeck_mode', 'mangohud_workaround', 'disable_vkbasalt', 'force_enable_vkbasalt', 'enable_wsi']
-ALL_FIELDS = ['dll', 'multiplier', 'flow_scale', 'performance_mode', 'hdr_mode', 'experimental_present_mode', 'dxvk_frame_rate', 'enable_wow64', 'disable_steamdeck_mode', 'mangohud_workaround', 'disable_vkbasalt', 'force_enable_vkbasalt', 'enable_wsi']
+ALL_FIELDS = ['dll', 'no_fp16', 'multiplier', 'flow_scale', 'performance_mode', 'hdr_mode', 'experimental_present_mode', 'dxvk_frame_rate', 'enable_wow64', 'disable_steamdeck_mode', 'mangohud_workaround', 'disable_vkbasalt', 'force_enable_vkbasalt', 'enable_wsi']
diff --git a/py_modules/lsfg_vk/configuration_helpers_generated.py b/py_modules/lsfg_vk/configuration_helpers_generated.py
index b34865a..f8edd97 100644
--- a/py_modules/lsfg_vk/configuration_helpers_generated.py
+++ b/py_modules/lsfg_vk/configuration_helpers_generated.py
@@ -9,7 +9,7 @@ from .config_schema_generated import ConfigurationData, ALL_FIELDS
def log_configuration_update(logger, config: ConfigurationData) -> None:
"""Log configuration update with all field values"""
- logger.info(f"Updated lsfg TOML configuration: dll={config['dll']}, multiplier={config['multiplier']}, flow_scale={config['flow_scale']}, performance_mode={config['performance_mode']}, hdr_mode={config['hdr_mode']}, experimental_present_mode={config['experimental_present_mode']}, dxvk_frame_rate={config['dxvk_frame_rate']}, enable_wow64={config['enable_wow64']}, disable_steamdeck_mode={config['disable_steamdeck_mode']}, mangohud_workaround={config['mangohud_workaround']}, disable_vkbasalt={config['disable_vkbasalt']}, force_enable_vkbasalt={config['force_enable_vkbasalt']}, enable_wsi={config['enable_wsi']}")
+ logger.info(f"Updated lsfg TOML configuration: dll={config['dll']}, no_fp16={config['no_fp16']}, multiplier={config['multiplier']}, flow_scale={config['flow_scale']}, performance_mode={config['performance_mode']}, hdr_mode={config['hdr_mode']}, experimental_present_mode={config['experimental_present_mode']}, dxvk_frame_rate={config['dxvk_frame_rate']}, enable_wow64={config['enable_wow64']}, disable_steamdeck_mode={config['disable_steamdeck_mode']}, mangohud_workaround={config['mangohud_workaround']}, disable_vkbasalt={config['disable_vkbasalt']}, force_enable_vkbasalt={config['force_enable_vkbasalt']}, enable_wsi={config['enable_wsi']}")
def get_config_field_names() -> list[str]:
diff --git a/shared_config.py b/shared_config.py
index 09aa596..c9df045 100644
--- a/shared_config.py
+++ b/shared_config.py
@@ -28,6 +28,14 @@ CONFIG_SCHEMA_DEF = {
"location": "toml" # where this field is stored/used
},
+ "no_fp16": {
+ "name": "no_fp16",
+ "fieldType": ConfigFieldType.BOOLEAN,
+ "default": False,
+ "description": "force-disable fp16 (use on older nvidia cards)",
+ "location": "toml"
+ },
+
"multiplier": {
"name": "multiplier",
"fieldType": ConfigFieldType.INTEGER,
@@ -47,7 +55,7 @@ CONFIG_SCHEMA_DEF = {
"performance_mode": {
"name": "performance_mode",
"fieldType": ConfigFieldType.BOOLEAN,
- "default": True,
+ "default": False,
"description": "use a lighter model for FG (recommended for most games)",
"location": "toml"
},
diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx
index 93d13a3..31ce278 100644
--- a/src/components/ConfigurationSection.tsx
+++ b/src/components/ConfigurationSection.tsx
@@ -4,7 +4,7 @@ import { RiArrowDownSFill, RiArrowUpSFill } from "react-icons/ri";
import { ConfigurationData } from "../config/configSchema";
import { FpsMultiplierControl } from "./FpsMultiplierControl";
import {
- FLOW_SCALE, PERFORMANCE_MODE, HDR_MODE,
+ NO_FP16, FLOW_SCALE, PERFORMANCE_MODE, HDR_MODE,
EXPERIMENTAL_PRESENT_MODE, DXVK_FRAME_RATE, DISABLE_STEAMDECK_MODE,
MANGOHUD_WORKAROUND, DISABLE_VKBASALT, FORCE_ENABLE_VKBASALT, ENABLE_WSI
} from "../config/generatedConfigSchema";
@@ -115,6 +115,15 @@ export function ConfigurationSection({
<PanelSectionRow>
<ToggleField
+ label="Force Disable FP16"
+ description="Force-disable FP16 acceleration"
+ checked={config.no_fp16}
+ onChange={(value) => onConfigChange(NO_FP16, value)}
+ />
+ </PanelSectionRow>
+
+ <PanelSectionRow>
+ <ToggleField
label="HDR Mode"
description={config.enable_wsi ? "Enables HDR mode (only for games that support HDR)" : "Enable WSI in the workarounds menu to unlock HDR toggle"}
checked={config.hdr_mode}
diff --git a/src/config/configSchema.ts b/src/config/configSchema.ts
index ed590df..b6ed9bb 100644
--- a/src/config/configSchema.ts
+++ b/src/config/configSchema.ts
@@ -20,7 +20,7 @@ export {
getDefaults,
getFieldTypes,
// Field name constants for type-safe access
- DLL, MULTIPLIER, FLOW_SCALE, PERFORMANCE_MODE, HDR_MODE,
+ DLL, NO_FP16, MULTIPLIER, FLOW_SCALE, PERFORMANCE_MODE, HDR_MODE,
EXPERIMENTAL_PRESENT_MODE, DXVK_FRAME_RATE, ENABLE_WOW64,
DISABLE_STEAMDECK_MODE, MANGOHUD_WORKAROUND, DISABLE_VKBASALT,
FORCE_ENABLE_VKBASALT, ENABLE_WSI
diff --git a/src/config/generatedConfigSchema.ts b/src/config/generatedConfigSchema.ts
index 866558c..9e61128 100644
--- a/src/config/generatedConfigSchema.ts
+++ b/src/config/generatedConfigSchema.ts
@@ -9,6 +9,7 @@ export enum ConfigFieldType {
// Field name constants for type-safe access
export const DLL = "dll" as const;
+export const NO_FP16 = "no_fp16" as const;
export const MULTIPLIER = "multiplier" as const;
export const FLOW_SCALE = "flow_scale" as const;
export const PERFORMANCE_MODE = "performance_mode" as const;
@@ -38,6 +39,12 @@ export const CONFIG_SCHEMA: Record<string, ConfigField> = {
default: "/games/Lossless Scaling/Lossless.dll",
description: "specify where Lossless.dll is stored"
},
+ no_fp16: {
+ name: "no_fp16",
+ fieldType: ConfigFieldType.BOOLEAN,
+ default: false,
+ description: "force-disable fp16 (use on older nvidia cards)"
+ },
multiplier: {
name: "multiplier",
fieldType: ConfigFieldType.INTEGER,
@@ -53,7 +60,7 @@ export const CONFIG_SCHEMA: Record<string, ConfigField> = {
performance_mode: {
name: "performance_mode",
fieldType: ConfigFieldType.BOOLEAN,
- default: true,
+ default: false,
description: "use a lighter model for FG (recommended for most games)"
},
hdr_mode: {
@@ -115,6 +122,7 @@ export const CONFIG_SCHEMA: Record<string, ConfigField> = {
// Type-safe configuration data structure
export interface ConfigurationData {
dll: string;
+ no_fp16: boolean;
multiplier: number;
flow_scale: number;
performance_mode: boolean;
@@ -137,9 +145,10 @@ export function getFieldNames(): string[] {
export function getDefaults(): ConfigurationData {
return {
dll: "/games/Lossless Scaling/Lossless.dll",
+ no_fp16: false,
multiplier: 1,
flow_scale: 0.8,
- performance_mode: true,
+ performance_mode: false,
hdr_mode: false,
experimental_present_mode: "fifo",
dxvk_frame_rate: 0,
@@ -155,6 +164,7 @@ export function getDefaults(): ConfigurationData {
export function getFieldTypes(): Record<string, ConfigFieldType> {
return {
dll: ConfigFieldType.STRING,
+ no_fp16: ConfigFieldType.BOOLEAN,
multiplier: ConfigFieldType.INTEGER,
flow_scale: ConfigFieldType.FLOAT,
performance_mode: ConfigFieldType.BOOLEAN,