Skip to content

Commit

Permalink
Add GLSL toggle
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
popsUlfr committed Jan 1, 2019
1 parent ecc05f1 commit afe22f7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,5 +213,6 @@ the Wine prefix. Removing the option will revert to the previous behavior.
| <tt>forcelgadd</tt> | <tt>PROTON_FORCE_LARGE_ADDRESS_AWARE</tt> | Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. |
| <tt>galliumnine</tt> | <tt>PROTON_USE_GALLIUM_NINE</tt> | Use Gallium Nine (can also be enabled on the staging tab in winecfg). |
| | <tt>PROTON_GALLIUM_NINE_MODULEPATH</tt> | Set the modulepath for `d3dadapter9.so.1`. By default `/usr/lib32/d3d/d3dadapter9.so.1:/usr/lib64/d3d/d3dadapter9.so.1` |
| <tt>noglsl</tt> | <tt>PROTON_NO_GLSL</tt> | Disable GLSL shaders and use ARB shaders instead. Can reduce stuttering when using wined3d. |

<!-- Target: GitHub Flavor Markdown. To test locally: pandoc -f markdown_github -t html README.md -->
13 changes: 13 additions & 0 deletions proton
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions user_settings.sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
2 changes: 1 addition & 1 deletion wine

0 comments on commit afe22f7

Please sign in to comment.