From afe22f78e4c038bffcd840e4bae35569454934d5 Mon Sep 17 00:00:00 2001 From: Philipp Richter Date: Tue, 1 Jan 2019 18:37:09 +0100 Subject: [PATCH] Add GLSL toggle With the environment variable PROTON_NO_GLSL=1 you can tell wine to disable GLSL shaders and use ARB shaders instead which might reduce stuttering in games with wined3d. Usually favours nvidia graphics drivers. --- README.md | 1 + proton | 13 +++++++++++++ user_settings.sample.py | 3 +++ wine | 2 +- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ef7c632d..8fce824bc 100644 --- a/README.md +++ b/README.md @@ -213,5 +213,6 @@ the Wine prefix. Removing the option will revert to the previous behavior. | forcelgadd | PROTON_FORCE_LARGE_ADDRESS_AWARE | Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. | | galliumnine | PROTON_USE_GALLIUM_NINE | Use Gallium Nine (can also be enabled on the staging tab in winecfg). | | | PROTON_GALLIUM_NINE_MODULEPATH | Set the modulepath for `d3dadapter9.so.1`. By default `/usr/lib32/d3d/d3dadapter9.so.1:/usr/lib64/d3d/d3dadapter9.so.1` | +| noglsl | PROTON_NO_GLSL | Disable GLSL shaders and use ARB shaders instead. Can reduce stuttering when using wined3d. | diff --git a/proton b/proton index 37c16e4a3..750d28691 100755 --- a/proton +++ b/proton @@ -454,6 +454,19 @@ else: "/v", "d3d9", "/f"], env=env, stdout=DEVNULL, stderr=DEVNULL) +check_environment("PROTON_NO_GLSL", "noglsl") +subprocess.call([wine_path, "reg", "add", + "HKEY_CURRENT_USER\\Software\\Wine\\Direct3D", + "/v", "UseGLSL", + "/d", "disabled" if "noglsl" in config_opts else "enabled", + "/f"], env=env, stdout=DEVNULL, stderr=DEVNULL) +subprocess.call([wine_path, "reg", "add", + "HKEY_CURRENT_USER\\Software\\Wine\\Direct3D", + "/v", "MaxVersionGL", + "/t", "REG_DWORD", + "/d", "0x00030001" if "noglsl" in config_opts else "0", + "/f"], env=env, stdout=DEVNULL, stderr=DEVNULL) + ARCH_UNKNOWN=0 ARCH_I386=1 ARCH_X86_64=2 diff --git a/user_settings.sample.py b/user_settings.sample.py index cd6dfefea..c8fef61d3 100755 --- a/user_settings.sample.py +++ b/user_settings.sample.py @@ -23,4 +23,7 @@ #Specify d3dadapter9.so.1 path # "PROTON_GALLIUM_NINE_MODULEPATH": "/usr/lib32/d3d/d3dadapter9.so.1:/usr/lib64/d3d/d3dadapter9.so.1", + + #Disable GLSL shaders and use ARB shaders instead +# "PROTON_NO_GLSL": "1", } diff --git a/wine b/wine index 4505ffee4..5f07602d5 160000 --- a/wine +++ b/wine @@ -1 +1 @@ -Subproject commit 4505ffee47b0a0dec571e72d03a20ca0108b6013 +Subproject commit 5f07602d56ff3c347e5a415825a551e878ad9aef