mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-01-13 23:28:16 +03:00
proton: Use DXVK for d3d10 as well.
This commit is contained in:
parent
f7ea4cb866
commit
e5f38f9f4c
@ -181,7 +181,7 @@ 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_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_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>wined3d11</tt> | <tt>PROTON_USE_WINED3D11</tt> | Use OpenGL-based wined3d instead of Vulkan-based DXVK for d3d11. |
|
| <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>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>noesync</tt> | <tt>PROTON_NO_ESYNC</tt> | Do not use eventfd-based in-process synchronization primitives. |
|
||||||
|
|
||||||
|
@ -871,6 +871,9 @@ dxvk64: $(DXVK_CONFIGURE_FILES64)
|
|||||||
mkdir -p "$(DST_DIR)/lib64/wine/dxvk"
|
mkdir -p "$(DST_DIR)/lib64/wine/dxvk"
|
||||||
cp "$(DXVK_OBJ64)"/bin/dxgi.dll "$(DST_DIR)"/lib64/wine/dxvk
|
cp "$(DXVK_OBJ64)"/bin/dxgi.dll "$(DST_DIR)"/lib64/wine/dxvk
|
||||||
cp "$(DXVK_OBJ64)"/bin/d3d11.dll "$(DST_DIR)"/lib64/wine/dxvk
|
cp "$(DXVK_OBJ64)"/bin/d3d11.dll "$(DST_DIR)"/lib64/wine/dxvk
|
||||||
|
cp "$(DXVK_OBJ64)"/bin/d3d10.dll "$(DST_DIR)"/lib64/wine/dxvk
|
||||||
|
cp "$(DXVK_OBJ64)"/bin/d3d10_1.dll "$(DST_DIR)"/lib64/wine/dxvk
|
||||||
|
cp "$(DXVK_OBJ64)"/bin/d3d10core.dll "$(DST_DIR)"/lib64/wine/dxvk
|
||||||
( cd $(SRCDIR) && git submodule status -- dxvk ) > "$(DST_DIR)"/lib64/wine/dxvk/version
|
( cd $(SRCDIR) && git submodule status -- dxvk ) > "$(DST_DIR)"/lib64/wine/dxvk/version
|
||||||
|
|
||||||
|
|
||||||
@ -882,6 +885,9 @@ dxvk32: $(DXVK_CONFIGURE_FILES32)
|
|||||||
mkdir -p "$(DST_DIR)"/lib/wine/dxvk
|
mkdir -p "$(DST_DIR)"/lib/wine/dxvk
|
||||||
cp "$(DXVK_OBJ32)"/bin/dxgi.dll "$(DST_DIR)"/lib/wine/dxvk/
|
cp "$(DXVK_OBJ32)"/bin/dxgi.dll "$(DST_DIR)"/lib/wine/dxvk/
|
||||||
cp "$(DXVK_OBJ32)"/bin/d3d11.dll "$(DST_DIR)"/lib/wine/dxvk/
|
cp "$(DXVK_OBJ32)"/bin/d3d11.dll "$(DST_DIR)"/lib/wine/dxvk/
|
||||||
|
cp "$(DXVK_OBJ32)"/bin/d3d10.dll "$(DST_DIR)"/lib/wine/dxvk/
|
||||||
|
cp "$(DXVK_OBJ32)"/bin/d3d10_1.dll "$(DST_DIR)"/lib/wine/dxvk/
|
||||||
|
cp "$(DXVK_OBJ32)"/bin/d3d10core.dll "$(DST_DIR)"/lib/wine/dxvk/
|
||||||
( cd $(SRCDIR) && git submodule status -- dxvk ) > "$(DST_DIR)"/lib/wine/dxvk/version
|
( cd $(SRCDIR) && git submodule status -- dxvk ) > "$(DST_DIR)"/lib/wine/dxvk/version
|
||||||
|
|
||||||
endif # NO_DXVK
|
endif # NO_DXVK
|
||||||
|
32
proton
32
proton
@ -188,18 +188,23 @@ if os.path.exists(basedir + "/user_settings.py"):
|
|||||||
|
|
||||||
def check_environment(env_name, config_name):
|
def check_environment(env_name, config_name):
|
||||||
if not env_name in env:
|
if not env_name in env:
|
||||||
return
|
return False
|
||||||
if env[env_name] == "0" or len(env[env_name]) == 0:
|
if env[env_name] == "0" or len(env[env_name]) == 0:
|
||||||
config_opts.discard(config_name)
|
config_opts.discard(config_name)
|
||||||
else:
|
else:
|
||||||
config_opts.add(config_name)
|
config_opts.add(config_name)
|
||||||
|
return True
|
||||||
|
|
||||||
if "STEAM_COMPAT_CONFIG" in os.environ:
|
if "STEAM_COMPAT_CONFIG" in os.environ:
|
||||||
config_opts = set(os.environ["STEAM_COMPAT_CONFIG"].split(","))
|
config_opts = set(os.environ["STEAM_COMPAT_CONFIG"].split(","))
|
||||||
else:
|
else:
|
||||||
config_opts = set()
|
config_opts = set()
|
||||||
|
|
||||||
check_environment("PROTON_USE_WINED3D11", "wined3d11")
|
if "wined3d11" in config_opts:
|
||||||
|
config_opts.add("wined3d")
|
||||||
|
|
||||||
|
if not check_environment("PROTON_USE_WINED3D", "wined3d"):
|
||||||
|
check_environment("PROTON_USE_WINED3D11", "wined3d")
|
||||||
check_environment("PROTON_NO_D3D11", "nod3d11")
|
check_environment("PROTON_NO_D3D11", "nod3d11")
|
||||||
check_environment("PROTON_NO_ESYNC", "noesync")
|
check_environment("PROTON_NO_ESYNC", "noesync")
|
||||||
|
|
||||||
@ -335,28 +340,29 @@ with prefix_lock:
|
|||||||
except (ValueError, OSError):
|
except (ValueError, OSError):
|
||||||
log("Unable to write VR config! " + str(sys.exc_info()[1]))
|
log("Unable to write VR config! " + str(sys.exc_info()[1]))
|
||||||
|
|
||||||
|
dxvkfiles = ("d3d11", "d3d10", "d3d10core", "d3d10_1", "dxgi")
|
||||||
def make_dxvk_links(dll_dir, link_dir):
|
def make_dxvk_links(dll_dir, link_dir):
|
||||||
if os.path.lexists(link_dir + "/d3d11.dll"):
|
for f in dxvkfiles:
|
||||||
os.remove(link_dir + "/d3d11.dll")
|
dst = link_dir + "/" + f + ".dll"
|
||||||
if os.path.lexists(link_dir + "/dxgi.dll"):
|
src = dll_dir + "/" + f + ".dll"
|
||||||
os.remove(link_dir + "/dxgi.dll")
|
if os.path.lexists(dst):
|
||||||
os.symlink(dll_dir + "/d3d11.dll", link_dir + "/d3d11.dll")
|
os.remove(dst)
|
||||||
os.symlink(dll_dir + "/dxgi.dll", link_dir + "/dxgi.dll")
|
os.symlink(src, dst)
|
||||||
|
|
||||||
if "wined3d11" in config_opts:
|
if "wined3d" in config_opts:
|
||||||
#use gl-based wined3d for d3d11
|
#use gl-based wined3d for d3d11 and d3d10
|
||||||
make_dxvk_links(basedir + "/dist/lib64/wine/fakedlls/",
|
make_dxvk_links(basedir + "/dist/lib64/wine/fakedlls/",
|
||||||
prefix + "drive_c/windows/system32")
|
prefix + "drive_c/windows/system32")
|
||||||
make_dxvk_links(basedir + "/dist/lib/wine/fakedlls/",
|
make_dxvk_links(basedir + "/dist/lib/wine/fakedlls/",
|
||||||
prefix + "drive_c/windows/syswow64")
|
prefix + "drive_c/windows/syswow64")
|
||||||
else:
|
else:
|
||||||
#use vulkan-based dxvk for d3d11
|
#use vulkan-based dxvk for d3d11 and d3d10
|
||||||
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"
|
for f in dxvkfiles:
|
||||||
dlloverrides["d3d11"] = "n"
|
dlloverrides[f] = "n"
|
||||||
|
|
||||||
if "nod3d11" in config_opts:
|
if "nod3d11" in config_opts:
|
||||||
dlloverrides["d3d11"] = ""
|
dlloverrides["d3d11"] = ""
|
||||||
|
@ -9,8 +9,8 @@ user_settings = {
|
|||||||
#Enable DXVK's HUD
|
#Enable DXVK's HUD
|
||||||
# "DXVK_HUD": "devinfo,fps",
|
# "DXVK_HUD": "devinfo,fps",
|
||||||
|
|
||||||
#Use wined3d for d3d11 instead of dxvk
|
#Use gl-based wined3d for d3d11 and d3d10 instead of vulkan-based dxvk
|
||||||
# "PROTON_USE_WINED3D11": "1",
|
# "PROTON_USE_WINED3D": "1",
|
||||||
|
|
||||||
#Disable d3d11 entirely
|
#Disable d3d11 entirely
|
||||||
# "PROTON_NO_D3D11": "1",
|
# "PROTON_NO_D3D11": "1",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user