mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-27 07:05:46 +03:00
proton: Use DXVK by default, add PROTON_USE_WINED3D11 switch
This commit is contained in:
parent
417831eeca
commit
3e05e9bb1a
13
README.md
13
README.md
@ -133,17 +133,18 @@ submodule and directory for details.
|
|||||||
----
|
----
|
||||||
Runtime Config Options
|
Runtime Config Options
|
||||||
----
|
----
|
||||||
Proton can be tuned at runtime to help certain games run. Options can either
|
Proton can be tuned at runtime to help certain games run. The Steam client sets
|
||||||
be defined in a comma-separated list stored in the <tt>STEAM_COMPAT_CONFIG</tt>
|
some options for known games using the <tt>STEAM_COMPAT_CONFIG</tt> variable.
|
||||||
environment variable when running Proton (the Steam client does this),
|
You can override these options using the environment variables described below.
|
||||||
or passed through the presence of individual environment variables as documented below.
|
To enable an option, set the variable to a non-<tt>0</tt> value. To disable an
|
||||||
|
option, set the variable to <tt>0</tt>.
|
||||||
|
|
||||||
All of the below are runtime options. They do not effect permanent changes to
|
All of the below are runtime options. They do not effect permanent changes to
|
||||||
the Wine prefix. Removing the option will revert to the previous behavior.
|
the Wine prefix. Removing the option will revert to the previous behavior.
|
||||||
|
|
||||||
| Compat config string | Environment Variable | Description |
|
| Compat config string | Environment Variable | Description |
|
||||||
| :-------------------- | :----------------------------- | :----------- |
|
| :-------------------- | :----------------------------- | :----------- |
|
||||||
| <tt>dxvk</tt> | <tt>PROTON_USE_DXVK</tt> | Run the game with DXVK instead of wined3d. |
|
| <tt>wined3d11</tt> | <tt>PROTON_USE_WINED3D11</tt> | Use OpenGL-based wined3d instead of Vulkan-based DXVK for d3d11. |
|
||||||
| <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>nod3d11</tt> | <tt>PROTON_NO_D3D11</tt> | Disable <tt>d3d11.dll</tt>, for games which can fall back to and run better with d3d9. |
|
||||||
|
|
||||||
<!-- Target: GitHub Flavor Markdown. To test locally: pandoc -f markdown_github -t html README.md -->
|
<!-- Target: GitHub Flavor Markdown. To test locally: pandoc -f markdown_github -t html README.md -->
|
||||||
|
33
proton
33
proton
@ -50,16 +50,21 @@ if not ("STEAM_COMPAT_DATA_PATH" in os.environ):
|
|||||||
log("No compat data path?")
|
log("No compat data path?")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
def check_environment(env_name, config_name):
|
||||||
|
if not env_name in os.environ:
|
||||||
|
return
|
||||||
|
if os.environ[env_name] == "0" or len(os.environ[env_name]) == 0:
|
||||||
|
config_opts.remove(config_name)
|
||||||
|
else:
|
||||||
|
config_opts.add(config_name)
|
||||||
|
|
||||||
if "STEAM_COMPAT_CONFIG" in os.environ:
|
if "STEAM_COMPAT_CONFIG" in os.environ:
|
||||||
config_opts = os.environ["STEAM_COMPAT_CONFIG"].split(",")
|
config_opts = set(os.environ["STEAM_COMPAT_CONFIG"].split(","))
|
||||||
else:
|
else:
|
||||||
config_opts = []
|
config_opts = set()
|
||||||
|
|
||||||
if "PROTON_USE_DXVK" in os.environ:
|
check_environment("PROTON_USE_WINED3D11", "wined3d11")
|
||||||
config_opts.append("dxvk")
|
check_environment("PROTON_NO_D3D11", "nod3d11")
|
||||||
|
|
||||||
if "PROTON_NO_D3D11" in os.environ:
|
|
||||||
config_opts.append("nod3d11")
|
|
||||||
|
|
||||||
basedir = os.path.dirname(sys.argv[0])
|
basedir = os.path.dirname(sys.argv[0])
|
||||||
bindir = basedir + "/dist/bin/"
|
bindir = basedir + "/dist/bin/"
|
||||||
@ -245,18 +250,20 @@ with prefix_lock:
|
|||||||
os.symlink(dll_dir + "/d3d11.dll", link_dir + "/d3d11.dll")
|
os.symlink(dll_dir + "/d3d11.dll", link_dir + "/d3d11.dll")
|
||||||
os.symlink(dll_dir + "/dxgi.dll", link_dir + "/dxgi.dll")
|
os.symlink(dll_dir + "/dxgi.dll", link_dir + "/dxgi.dll")
|
||||||
|
|
||||||
if "dxvk" in config_opts:
|
if "wined3d11" in config_opts:
|
||||||
|
#use gl-based wined3d for d3d11
|
||||||
|
make_dxvk_links(basedir + "/dist/lib64/wine/",
|
||||||
|
prefix + "drive_c/windows/system32")
|
||||||
|
make_dxvk_links(basedir + "/dist/lib/wine/",
|
||||||
|
prefix + "drive_c/windows/syswow64")
|
||||||
|
else:
|
||||||
|
#use vulkan-based dxvk for d3d11
|
||||||
make_dxvk_links(basedir + "/dist/lib64/wine/dxvk/",
|
make_dxvk_links(basedir + "/dist/lib64/wine/dxvk/",
|
||||||
prefix + "drive_c/windows/system32")
|
prefix + "drive_c/windows/system32")
|
||||||
make_dxvk_links(basedir + "/dist/lib/wine/dxvk/",
|
make_dxvk_links(basedir + "/dist/lib/wine/dxvk/",
|
||||||
prefix + "drive_c/windows/syswow64")
|
prefix + "drive_c/windows/syswow64")
|
||||||
dlloverrides["dxgi"] = "n"
|
dlloverrides["dxgi"] = "n"
|
||||||
dlloverrides["d3d11"] = "n"
|
dlloverrides["d3d11"] = "n"
|
||||||
else:
|
|
||||||
make_dxvk_links(basedir + "/dist/lib64/wine/",
|
|
||||||
prefix + "drive_c/windows/system32")
|
|
||||||
make_dxvk_links(basedir + "/dist/lib/wine/",
|
|
||||||
prefix + "drive_c/windows/syswow64")
|
|
||||||
|
|
||||||
if "nod3d11" in config_opts:
|
if "nod3d11" in config_opts:
|
||||||
dlloverrides["d3d11"] = ""
|
dlloverrides["d3d11"] = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user