proton: Add force large address aware runtime setting

This commit is contained in:
Andrew Eikum 2018-12-17 10:25:19 -06:00
parent 6a12732dd3
commit 1fb4db2331
2 changed files with 11 additions and 1 deletions

View File

@ -206,9 +206,10 @@ the Wine prefix. Removing the option will revert to the previous behavior.
| :-------------------- | :----------------------------- | :----------- |
| | <tt>PROTON_LOG</tt> | Convenience method for dumping a useful debug log to `$HOME/steam-$APPID.log`. For more thorough logging, use `user_settings.py`. |
| | <tt>PROTON_DUMP_DEBUG_COMMANDS</tt> | When running a game, Proton will write some useful debug scripts for that game into `$PROTON_DEBUG_DIR/proton_$USER/`. |
| | <tt>PROTON_DEBUG_DIR<tt> | Root directory for the Proton debug scripts, `/tmp` by default. |
| | <tt>PROTON_DEBUG_DIR</tt> | Root directory for the Proton debug scripts, `/tmp` by default. |
| <tt>wined3d</tt> | <tt>PROTON_USE_WINED3D</tt> | Use OpenGL-based wined3d instead of Vulkan-based DXVK for d3d11 and d3d10. This used to be called `PROTON_USE_WINED3D11`, which is now an alias for this same option. |
| <tt>nod3d11</tt> | <tt>PROTON_NO_D3D11</tt> | Disable <tt>d3d11.dll</tt>, for games which can fall back to and run better with d3d9. |
| <tt>noesync</tt> | <tt>PROTON_NO_ESYNC</tt> | Do not use eventfd-based in-process synchronization primitives. |
| <tt>forcelgadd</tt> | <tt>PROTON_FORCE_LARGE_ADDRESS_AWARE</tt> | Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. |
<!-- Target: GitHub Flavor Markdown. To test locally: pandoc -f markdown_github -t html README.md -->

9
proton
View File

@ -220,10 +220,17 @@ if not check_environment("PROTON_USE_WINED3D", "wined3d"):
check_environment("PROTON_USE_WINED3D11", "wined3d")
check_environment("PROTON_NO_D3D11", "nod3d11")
check_environment("PROTON_NO_ESYNC", "noesync")
check_environment("PROTON_FORCE_LARGE_ADDRESS_AWARE", "forcelgadd")
if not "noesync" in config_opts:
env["WINEESYNC"] = "1"
if "forcelgadd" in config_opts:
#forcelgadd should be used just for testing whether a game is helped by
#setting LARGE_ADDRESS_AWARE. If it does, then add an AppDefault in the
#registry, so that it doesn't impact every executable in the prefix.
env["WINE_LARGE_ADDRESS_AWARE"] = "1"
lfile = None
if "SteamGameId" in env:
if env["WINEDEBUG"] != "-all":
@ -466,6 +473,8 @@ def dump_dbg_env(f):
f.write("\tWINEDLLOVERRIDES=\"" + env["WINEDLLOVERRIDES"] + "\" \\\n")
if "STEAM_COMPAT_CLIENT_INSTALL_PATH" in env:
f.write("\tSTEAM_COMPAT_CLIENT_INSTALL_PATH=\"" + env["STEAM_COMPAT_CLIENT_INSTALL_PATH"] + "\" \\\n")
if "WINE_LARGE_ADDRESS_AWARE" in env:
f.write("\tWINE_LARGE_ADDRESS_AWARE=\"" + env["WINE_LARGE_ADDRESS_AWARE"] + "\" \\\n")
def dump_dbg_scripts():
exe_name = os.path.basename(sys.argv[2])