From 5590eec19bdcec6fc26eb9e6c0ce9b08afb8cb0c Mon Sep 17 00:00:00 2001 From: koplo199 <85577251+koplo199@users.noreply.github.com> Date: Tue, 29 Aug 2023 08:32:11 +0200 Subject: [PATCH] fix: LatencyFlex (#3057) * fix: LatencyFlex * fix: correctly use native DLL overrides --- bottles/backend/wine/executor.py | 6 +++--- bottles/backend/wine/winecommand.py | 11 ++++------- com.usebottles.bottles.yml | 20 +------------------- 3 files changed, 8 insertions(+), 29 deletions(-) diff --git a/bottles/backend/wine/executor.py b/bottles/backend/wine/executor.py index 39d8ca606d..2a734eb143 100644 --- a/bottles/backend/wine/executor.py +++ b/bottles/backend/wine/executor.py @@ -65,17 +65,17 @@ def __init__( if override_dxvk is not None \ and not override_dxvk \ and self.config.Parameters.dxvk: - env_dll_overrides.append("d3d9,d3d11,d3d10core,dxgi=b") + env_dll_overrides.append("d3d9,d3d11,d3d10core,dxgi=n") if override_vkd3d is not None \ and not override_vkd3d \ and self.config.Parameters.vkd3d: - env_dll_overrides.append("d3d12=b;d3d12core=b,n") + env_dll_overrides.append("d3d12,d3d12core=n") if override_nvapi is not None \ and not override_nvapi \ and self.config.Parameters.dxvk_nvapi: - env_dll_overrides.append("nvapi,nvapi64=b") + env_dll_overrides.append("nvapi,nvapi64=n") if override_fsr is not None and override_fsr: self.environment["WINE_FULLSCREEN_FSR"] = "1" diff --git a/bottles/backend/wine/winecommand.py b/bottles/backend/wine/winecommand.py index cbe469f270..22ddcb71f0 100644 --- a/bottles/backend/wine/winecommand.py +++ b/bottles/backend/wine/winecommand.py @@ -282,15 +282,17 @@ def get_env(self, environment: Optional[dict] = None, return_steam_env: bool = F env.add("__GL_SHADER_DISK_CACHE_PATH", os.path.join(bottle, "cache", "gl_shader")) env.add("MESA_SHADER_CACHE_DIR", os.path.join(bottle, "cache", "mesa_shader")) - # VKD£D environment variables + # VKD3D environment variables if params.vkd3d and not return_steam_env: env.add("VKD3D_SHADER_CACHE_PATH", os.path.join(bottle, "cache", "vkd3d_shader")) # LatencyFleX environment variables if params.latencyflex and not return_steam_env: _lf_path = ManagerUtils.get_latencyflex_path(config.LatencyFleX) - _lf_icd = os.path.join(_lf_path, "layer/usr/share/vulkan/implicit_layer.d/latencyflex.json") + _lf_layer_path = os.path.join(_lf_path, "layer/usr/share/vulkan/implicit_layer.d") + env.concat("VK_ADD_LAYER_PATH", _lf_layer_path) env.add("LFX", "1") + ld.append(os.path.join(_lf_path, "layer/usr/lib/x86_64-linux-gnu")) else: env.add("DISABLE_LFX", "1") @@ -336,11 +338,6 @@ def get_env(self, environment: Optional[dict] = None, return_steam_env: bool = F debug_level = "+fixme-all" env.add("WINEDEBUG", debug_level) - # LatencyFleX - if params.latencyflex and params.dxvk_nvapi and not return_steam_env: - _lf_path = ManagerUtils.get_latencyflex_path(config.LatencyFleX) - ld.append(os.path.join(_lf_path, "wine/usr/lib/wine/x86_64-unix")) - # Aco compiler # if params["aco_compiler"]: # env.add("ACO_COMPILER", "aco") diff --git a/com.usebottles.bottles.yml b/com.usebottles.bottles.yml index 6f9e379ec9..51221715d8 100644 --- a/com.usebottles.bottles.yml +++ b/com.usebottles.bottles.yml @@ -86,6 +86,7 @@ cleanup: cleanup-commands: - mkdir -p /app/utils - mkdir -p /app/share/steam/compatibilitytools.d + - mkdir -p /app/share/vulkan/implicit_layer.d/ modules: # PYPI modules @@ -178,25 +179,6 @@ modules: # Libraries # ---------------------------------------------------------------------------- - - name: LatencyFleX - buildsystem: simple - build-commands: - - mkdir -p /app/lib/x86_64-linux-gnu/ - - mkdir -p /app/share/vulkan/implicit_layer.d/ - - cp layer/usr/lib/x86_64-linux-gnu/liblatencyflex_layer.so /app/lib/x86_64-linux-gnu/liblatencyflex_layer.so - - cp layer/usr/share/vulkan/implicit_layer.d/latencyflex.json /app/share/vulkan/implicit_layer.d/latencyflex.json - sources: - - type: archive - url: https://github.com/ishitatsuyuki/LatencyFleX/releases/download/v0.1.1/latencyflex-v0.1.1.tar.xz - sha256: c992ebd2f43c99ab4a84a6ffce692d9aae4cc2571536a5854ae2e79b6951e78a - x-checker-data: - type: json - is-important: true - url: https://api.github.com/repos/ishitatsuyuki/LatencyFleX/releases/latest - version-query: .tag_name - url-query: '"https://github.com/ishitatsuyuki/LatencyFleX/releases/download/" - + $version + "/latencyflex-" + $version + ".tar.xz"' - - name: ImageMagick config-opts: - --disable-static