From 931984d61af37273a6375ab58f24af955747c325 Mon Sep 17 00:00:00 2001 From: "Pierre-Loup A. Griffais" Date: Sat, 13 Oct 2018 07:58:03 -0700 Subject: [PATCH 1/9] Update CHANGELOG.md --- CHANGELOG.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73adc3ea..8f59d21d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,16 @@ -## Available in Proton 3.7 Beta: +## Available in Proton 3.16 Beta: +###### 3.16-1: +- Rebased Proton patches onto Wine 3.16. +- Updated Vulkan support in Wine to 1.1.86, plus support for transform feedback. +- DXVK has been updated to 0.81 plus support for transform feedback which should fix missing models in many D3D11 games. This requires new driver support. DXVK release notes can be found here: https://github.com/doitsujin/dxvk/releases/tag/v0.81 +- DXVK's d3d10 mode is now enabled by default. +- DXVK is now built as a native Linux library, which may give a small performance boost, and should make debugging easier for DXVK and driver developers. +- Missing textures for models in some VR games has been resolved. +- Ask the window manager to bypass the compositor in fullscreen mode. This may improve performance in some situations. +- All new makefile-based build system. +## Available in Proton 3.7: ###### 3.7-8: - Minor compatibility fixes in preparation for future Proton versions. -## Available in Proton 3.7: ###### 3.7-7: - Improvements to alt-tab and fullscreen behavior in many games. - Fix mouse behavior in some games and mice with high sample rates. From 93bfce4869f854bb2d3e24310ff0c59e67737b4d Mon Sep 17 00:00:00 2001 From: "Pierre-Loup A. Griffais" Date: Sat, 13 Oct 2018 08:31:22 -0700 Subject: [PATCH 2/9] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f59d21d..b4939b84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ###### 3.16-1: - Rebased Proton patches onto Wine 3.16. - Updated Vulkan support in Wine to 1.1.86, plus support for transform feedback. -- DXVK has been updated to 0.81 plus support for transform feedback which should fix missing models in many D3D11 games. This requires new driver support. DXVK release notes can be found here: https://github.com/doitsujin/dxvk/releases/tag/v0.81 +- DXVK has been updated to [0.81](https://github.com/doitsujin/dxvk/releases/tag/v0.81) plus support for transform feedback which should fix missing models in many D3D11 games. *Transform feedback requires using Mesa git or NVIDIA's 396.54.09 Vulkan Beta driver*. - DXVK's d3d10 mode is now enabled by default. - DXVK is now built as a native Linux library, which may give a small performance boost, and should make debugging easier for DXVK and driver developers. - Missing textures for models in some VR games has been resolved. From cc3e4210cd47405d72f984a203978224e16384ca Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Mon, 15 Oct 2018 11:04:58 -0500 Subject: [PATCH 3/9] Revert "build dxvk as native .so" This reverts commits aef98f1e7df483ebc49acc7a8346c11bec2db8ed and f85b734f66606cd37ef74a3534fdeff4c9a55b3b. The Steam Runtime is too old to build DXVK, so we have to continue building it as a Windows DLL. --- README.md | 9 ++- build/makefile_base.mak | 76 ++++++++++------------- proton | 56 ++++++++--------- vrclient_x64/vrclient_x64/vrclient_main.c | 4 ++ 4 files changed, 72 insertions(+), 73 deletions(-) diff --git a/README.md b/README.md index 5be95325..87050094 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ which can have [security implications](https://docs.docker.com/engine/security/security/). Starting from a stock Debian 9 installation, you will need to install the -`gpgv2`, `gnupg2`, `g++`, and `g++-6-multilib` packages from the +`gpgv2`, `gnupg2`, `g++`, `g++-6-multilib`, and `mingw-w64` packages from the Debian repos. You will also need to install `meson` version 0.43 or later, which can be [acquired from backports](https://backports.debian.org/Instructions/). Next, [install Docker-CE from the official Docker repositories](https://docs.docker.com/install/linux/docker-ce/debian/). @@ -78,6 +78,13 @@ This will pull in all of the dependencies required to run wine. You can then (and we do) uninstall the `winehq-devel` package in order to ensure that a system Wine installation does not interfere with your build process. +DXVK requires that we choose the posix alternative for the mingw-w64 compilers: + + sudo update-alternatives --set x86_64-w64-mingw32-gcc `which x86_64-w64-mingw32-gcc-posix` + sudo update-alternatives --set x86_64-w64-mingw32-g++ `which x86_64-w64-mingw32-g++-posix` + sudo update-alternatives --set i686-w64-mingw32-gcc `which i686-w64-mingw32-gcc-posix` + sudo update-alternatives --set i686-w64-mingw32-g++ `which i686-w64-mingw32-g++-posix` + Next we set up the Steam runtime build environments. Here we use the `wip-docker` branch to get access to the Docker images. diff --git a/build/makefile_base.mak b/build/makefile_base.mak index 468444a4..6d9a802f 100644 --- a/build/makefile_base.mak +++ b/build/makefile_base.mak @@ -230,8 +230,8 @@ STEAM_DIR := $(HOME)/.steam/root DIST_COPY_FILES := toolmanifest.vdf filelock.py proton proton_3.7_tracked_files user_settings.sample.py DIST_COPY_TARGETS := $(addprefix $(DST_BASE)/,$(DIST_COPY_FILES)) DIST_VERSION := $(DST_DIR)/version -DIST_OVR32 := $(DST_DIR)/lib/openvr_api_dxvk.so -DIST_OVR64 := $(DST_DIR)/lib64/openvr_api_dxvk.so +DIST_OVR32 := $(DST_DIR)/lib/wine/dxvk/openvr_api_dxvk.dll +DIST_OVR64 := $(DST_DIR)/lib64/wine/dxvk/openvr_api_dxvk.dll DIST_PREFIX := $(DST_DIR)/share/default_pfx/ DIST_COMPAT_MANIFEST := $(DST_BASE)/compatibilitytool.vdf DIST_LICENSE := $(DST_BASE)/LICENSE @@ -247,12 +247,12 @@ DEPLOY_COPY_TARGETS := $(DIST_COPY_TARGETS) $(DIST_VERSION) $(DIST_LICENSE) $(DIST_LICENSE): $(LICENSE) cp -a $< $@ -$(DIST_OVR32): $(SRCDIR)/openvr/bin/linux32/libopenvr_api.so | $(DST_DIR) - mkdir -p $(DST_DIR)/lib/ +$(DIST_OVR32): $(SRCDIR)/openvr/bin/win32/openvr_api.dll | $(DST_DIR) + mkdir -p $(DST_DIR)/lib/wine/dxvk cp -a $< $@ -$(DIST_OVR64): $(SRCDIR)/openvr/bin/linux64/libopenvr_api.so | $(DST_DIR) - mkdir -p $(DST_DIR)/lib64/ +$(DIST_OVR64): $(SRCDIR)/openvr/bin/win64/openvr_api.dll | $(DST_DIR) + mkdir -p $(DST_DIR)/lib64/wine/dxvk cp -a $< $@ $(DIST_COPY_TARGETS): | $(DST_DIR) @@ -830,24 +830,22 @@ DXVK_CONFIGURE_FILES32 := $(DXVK_OBJ32)/build.ninja DXVK_CONFIGURE_FILES64 := $(DXVK_OBJ64)/build.ninja # 64bit-configure -# the sed junk is to work around meson being unable to pass linker args to -# cross-file builds. -$(DXVK_CONFIGURE_FILES64): $(MAKEFILE_DEP) $(WINE_BUILDTOOLS64) | $(DXVK_OBJ64) +$(DXVK_CONFIGURE_FILES64): $(MAKEFILE_DEP) | $(DXVK_OBJ64) cd "$(DXVK)" && \ - sed -e "s|@PROTON_C_LINK_ARGS@|'-L$(abspath $(TOOLS_DIR64))/lib64', '-L$(abspath $(TOOLS_DIR64))/lib64/wine'|" \ - -e "s|@PROTON_C_ARGS@|'-I$(abspath $(TOOLS_DIR64))/include', '-I$(abspath $(TOOLS_DIR64))/include/wine', '-I$(abspath $(TOOLS_DIR64))/include/wine/windows'|" \ - < build-wine64.txt > proton-build-wine64.txt && \ - PATH="$(abspath $(SRCDIR))/glslang/bin/:$(abspath $(TOOLS_DIR64))/bin/:$(PATH)" \ - meson --libdir=lib/ --prefix="$(abspath $(DXVK_OBJ64))" --cross-file proton-build-wine64.txt --buildtype=release "$(abspath $(DXVK_OBJ64))" + PATH="$(abspath $(SRCDIR))/glslang/bin/:$(PATH)" \ + meson --prefix="$(abspath $(DXVK_OBJ64))" --cross-file build-win64.txt "$(abspath $(DXVK_OBJ64))" + + cd "$(DXVK_OBJ64)" && \ + PATH="$(abspath $(SRCDIR))/glslang/bin/:$(PATH)" meson configure -Dbuildtype=release # 32-bit configure -$(DXVK_CONFIGURE_FILES32): $(MAKEFILE_DEP) $(WINE_BUILDTOOLS32) | $(DXVK_OBJ32) +$(DXVK_CONFIGURE_FILES32): $(MAKEFILE_DEP) | $(DXVK_OBJ32) cd "$(DXVK)" && \ - sed -e "s|@PROTON_C_LINK_ARGS@|'-L$(abspath $(TOOLS_DIR32))/lib', '-L$(abspath $(TOOLS_DIR32))/lib/wine'|" \ - -e "s|@PROTON_C_ARGS@|'-I$(abspath $(TOOLS_DIR32))/include', '-I$(abspath $(TOOLS_DIR32))/include/wine', '-I$(abspath $(TOOLS_DIR32))/include/wine/windows'|" \ - < build-wine32.txt > proton-build-wine32.txt && \ - PATH="$(abspath $(SRCDIR))/glslang/bin/:$(abspath $(TOOLS_DIR32))/bin/:$(PATH)" \ - meson --libdir=lib/ --prefix="$(abspath $(DXVK_OBJ32))" --cross-file proton-build-wine32.txt --buildtype=release "$(abspath $(DXVK_OBJ32))" + PATH="$(abspath $(SRCDIR))/glslang/bin/:$(PATH)" \ + meson --prefix="$(abspath $(DXVK_OBJ32))" --cross-file build-win32.txt "$(abspath $(DXVK_OBJ32))" + + cd "$(DXVK_OBJ32)" && \ + PATH="$(abspath $(SRCDIR))/glslang/bin/:$(PATH)" meson configure -Dbuildtype=release ## dxvk goals DXVK_TARGETS = dxvk dxvk_configure dxvk32 dxvk64 dxvk_configure32 dxvk_configure64 @@ -866,31 +864,25 @@ dxvk_configure32: $(DXVK_CONFIGURE_FILES32) dxvk: dxvk32 dxvk64 dxvk64: $(DXVK_CONFIGURE_FILES64) - (cd "$(DXVK_OBJ64)" && \ - PATH="$(abspath $(SRCDIR))/glslang/bin/:$(abspath $(TOOLS_DIR64))/bin/:$(PATH)" ninja && \ - PATH="$(abspath $(SRCDIR))/glslang/bin/:$(abspath $(TOOLS_DIR64))/bin/:$(PATH)" ninja install) && \ - mkdir -p "$(DST_DIR)"/lib64/wine/dxvk "$(DST_DIR)"/lib64/wine/wined3d && \ - cp -a "$(DXVK_OBJ64)"/lib/*.dll.so "$(DST_DIR)"/lib64/wine/dxvk && \ - ( cd $(SRCDIR) && git submodule status -- dxvk ) > "$(DST_DIR)"/lib64/wine/dxvk/version && \ - for f in "$(DST_DIR)"/lib64/wine/dxvk/*.dll.so; do \ - if [ -e "$(DST_DIR)"/lib64/wine/$$(basename $$f) ]; then \ - mv "$(DST_DIR)"/lib64/wine/$$(basename $$f) "$(DST_DIR)"/lib64/wine/wined3d/; \ - fi; \ - done + cd "$(DXVK_OBJ64)" && \ + PATH="$(abspath $(SRCDIR))/glslang/bin/:$(PATH)" ninja && \ + PATH="$(abspath $(SRCDIR))/glslang/bin/:$(PATH)" ninja install + + mkdir -p "$(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 + ( cd $(SRCDIR) && git submodule status -- dxvk ) > "$(DST_DIR)"/lib64/wine/dxvk/version dxvk32: $(DXVK_CONFIGURE_FILES32) - (cd "$(DXVK_OBJ32)" && \ - PATH="$(abspath $(SRCDIR))/glslang/bin/:$(abspath $(TOOLS_DIR32)/bin/):$(PATH)" ninja && \ - PATH="$(abspath $(SRCDIR))/glslang/bin/:$(abspath $(TOOLS_DIR32)/bin/):$(PATH)" ninja install) && \ - mkdir -p "$(DST_DIR)"/lib/wine/dxvk "$(DST_DIR)"/lib/wine/wined3d && \ - cp -a "$(DXVK_OBJ32)"/lib/*.dll.so "$(DST_DIR)"/lib/wine/dxvk && \ - ( cd $(SRCDIR) && git submodule status -- dxvk ) > "$(DST_DIR)"/lib/wine/dxvk/version && \ - for f in "$(DST_DIR)"/lib/wine/dxvk/*.dll.so; do \ - if [ -e "$(DST_DIR)"/lib/wine/$$(basename $$f) ]; then \ - mv "$(DST_DIR)"/lib/wine/$$(basename $$f) "$(DST_DIR)"/lib/wine/wined3d/; \ - fi; \ - done + cd "$(DXVK_OBJ32)" && \ + PATH="$(abspath $(SRCDIR))/glslang/bin/:$(PATH)" ninja && \ + PATH="$(abspath $(SRCDIR))/glslang/bin/:$(PATH)" ninja install + + mkdir -p "$(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/ + ( cd $(SRCDIR) && git submodule status -- dxvk ) > "$(DST_DIR)"/lib/wine/dxvk/version endif # NO_DXVK diff --git a/proton b/proton index 2951d3fc..243e075b 100755 --- a/proton +++ b/proton @@ -82,31 +82,6 @@ def upgrade_pfx(old_ver): shutil.rmtree(prefix) return - if old_proton_ver == "3.7": - #proton 3.7 used symlinks to install DXVK. this is no longer needed, - #restore to correct wine configuration - log("Fixing up d3d11 symlinks") - - #64-bit - link_dir = prefix + "drive_c/windows/system32" - dll_dir = basedir + "/dist/lib64/wine/fakedlls" - if os.path.lexists(link_dir + "/d3d11.dll"): - os.remove(link_dir + "/d3d11.dll") - if os.path.lexists(link_dir + "/dxgi.dll"): - os.remove(link_dir + "/dxgi.dll") - shutil.copy(dll_dir + "/d3d11.dll", link_dir + "/d3d11.dll") - shutil.copy(dll_dir + "/dxgi.dll", link_dir + "/dxgi.dll") - - #32-bit - link_dir = prefix + "drive_c/windows/syswow64" - dll_dir = basedir + "/dist/lib/wine/fakedlls" - if os.path.lexists(link_dir + "/d3d11.dll"): - os.remove(link_dir + "/d3d11.dll") - if os.path.lexists(link_dir + "/dxgi.dll"): - os.remove(link_dir + "/dxgi.dll") - shutil.copy(dll_dir + "/d3d11.dll", link_dir + "/d3d11.dll") - shutil.copy(dll_dir + "/dxgi.dll", link_dir + "/dxgi.dll") - def run_wine(args): subprocess.call(args, env=env, stderr=lfile) @@ -231,11 +206,6 @@ check_environment("PROTON_NO_ESYNC", "noesync") if not "noesync" in config_opts: env["WINEESYNC"] = "1" -if "wined3d11" in config_opts: - env["WINEDLLPATH"] = lib64dir + "/wine/wined3d:" + libdir + "/wine/wined3d:" + env["WINEDLLPATH"] -else: - env["WINEDLLPATH"] = lib64dir + "/wine/dxvk:" + libdir + "/wine/dxvk:" + env["WINEDLLPATH"] - lfile = None if "SteamGameId" in env: if env["WINEDEBUG"] != "-all": @@ -288,6 +258,9 @@ with prefix_lock: shutil.copy(basedir + "/dist/lib/wine/fakedlls/vrclient.dll", dst) shutil.copy(basedir + "/dist/lib64/wine/fakedlls/vrclient_x64.dll", dst) + shutil.copy(basedir + "/dist/lib/wine/dxvk/openvr_api_dxvk.dll", prefix + "/drive_c/windows/syswow64/") + shutil.copy(basedir + "/dist/lib64/wine/dxvk/openvr_api_dxvk.dll", prefix + "/drive_c/windows/system32/") + #parse linux openvr config and present it in win32 format to the app. #logic from openvr's CVRPathRegistry_Public::GetPaths @@ -362,6 +335,29 @@ with prefix_lock: except (ValueError, OSError): log("Unable to write VR config! " + str(sys.exc_info()[1])) + def make_dxvk_links(dll_dir, link_dir): + if os.path.lexists(link_dir + "/d3d11.dll"): + os.remove(link_dir + "/d3d11.dll") + if os.path.lexists(link_dir + "/dxgi.dll"): + os.remove(link_dir + "/dxgi.dll") + os.symlink(dll_dir + "/d3d11.dll", link_dir + "/d3d11.dll") + os.symlink(dll_dir + "/dxgi.dll", link_dir + "/dxgi.dll") + + 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/", + prefix + "drive_c/windows/system32") + make_dxvk_links(basedir + "/dist/lib/wine/dxvk/", + prefix + "drive_c/windows/syswow64") + dlloverrides["dxgi"] = "n" + dlloverrides["d3d11"] = "n" + if "nod3d11" in config_opts: dlloverrides["d3d11"] = "" if "dxgi" in dlloverrides: diff --git a/vrclient_x64/vrclient_x64/vrclient_main.c b/vrclient_x64/vrclient_x64/vrclient_main.c index dc46e7cf..0fc03b09 100644 --- a/vrclient_x64/vrclient_x64/vrclient_main.c +++ b/vrclient_x64/vrclient_x64/vrclient_main.c @@ -650,6 +650,10 @@ static EVRCompositorError ivrcompositor_submit_dxvk( load_vk_unwrappers(); vkdata.m_nImage = (uint64_t)image_handle; + vkdata.m_pDevice = get_native_VkDevice(vkdata.m_pDevice); + vkdata.m_pPhysicalDevice = get_native_VkPhysicalDevice(vkdata.m_pPhysicalDevice); + vkdata.m_pInstance = get_native_VkInstance(vkdata.m_pInstance); + vkdata.m_pQueue = get_native_VkQueue(vkdata.m_pQueue); vkdata.m_nWidth = image_info.extent.width; vkdata.m_nHeight = image_info.extent.height; vkdata.m_nFormat = image_info.format; From f7ea4cb86631555c3b0386f681f7d2b5d70e3069 Mon Sep 17 00:00:00 2001 From: Kai Krakow Date: Sat, 6 Oct 2018 01:10:01 +0200 Subject: [PATCH 4/9] proton: Correct wined3d symlinks --- proton | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proton b/proton index 243e075b..f36a085d 100755 --- a/proton +++ b/proton @@ -345,9 +345,9 @@ with prefix_lock: if "wined3d11" in config_opts: #use gl-based wined3d for d3d11 - make_dxvk_links(basedir + "/dist/lib64/wine/", + make_dxvk_links(basedir + "/dist/lib64/wine/fakedlls/", prefix + "drive_c/windows/system32") - make_dxvk_links(basedir + "/dist/lib/wine/", + make_dxvk_links(basedir + "/dist/lib/wine/fakedlls/", prefix + "drive_c/windows/syswow64") else: #use vulkan-based dxvk for d3d11 From e5f38f9f4c903865c986af70237f1b4b19ce9017 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Mon, 15 Oct 2018 11:40:33 -0500 Subject: [PATCH 5/9] proton: Use DXVK for d3d10 as well. --- README.md | 2 +- build/makefile_base.mak | 6 ++++++ proton | 32 +++++++++++++++++++------------- user_settings.sample.py | 4 ++-- 4 files changed, 28 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 87050094..9342dca2 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,7 @@ the Wine prefix. Removing the option will revert to the previous behavior. | | PROTON_LOG | Convenience method for dumping a useful debug log to `$HOME/steam-$APPID.log`. For more thorough logging, use `user_settings.py`. | | | PROTON_DUMP_DEBUG_COMMANDS | When running a game, Proton will write some useful debug scripts for that game into `$PROTON_DEBUG_DIR/proton_$USER/`. | | | PROTON_DEBUG_DIR | Root directory for the Proton debug scripts, `/tmp` by default. | -| wined3d11 | PROTON_USE_WINED3D11 | Use OpenGL-based wined3d instead of Vulkan-based DXVK for d3d11. | +| wined3d | PROTON_USE_WINED3D | 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. | | nod3d11 | PROTON_NO_D3D11 | Disable d3d11.dll, for games which can fall back to and run better with d3d9. | | noesync | PROTON_NO_ESYNC | Do not use eventfd-based in-process synchronization primitives. | diff --git a/build/makefile_base.mak b/build/makefile_base.mak index 6d9a802f..7a01a719 100644 --- a/build/makefile_base.mak +++ b/build/makefile_base.mak @@ -871,6 +871,9 @@ dxvk64: $(DXVK_CONFIGURE_FILES64) mkdir -p "$(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/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 @@ -882,6 +885,9 @@ dxvk32: $(DXVK_CONFIGURE_FILES32) mkdir -p "$(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/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 endif # NO_DXVK diff --git a/proton b/proton index f36a085d..93294658 100755 --- a/proton +++ b/proton @@ -188,18 +188,23 @@ if os.path.exists(basedir + "/user_settings.py"): def check_environment(env_name, config_name): if not env_name in env: - return + return False if env[env_name] == "0" or len(env[env_name]) == 0: config_opts.discard(config_name) else: config_opts.add(config_name) + return True if "STEAM_COMPAT_CONFIG" in os.environ: config_opts = set(os.environ["STEAM_COMPAT_CONFIG"].split(",")) else: 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_ESYNC", "noesync") @@ -335,28 +340,29 @@ with prefix_lock: except (ValueError, OSError): 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): - if os.path.lexists(link_dir + "/d3d11.dll"): - os.remove(link_dir + "/d3d11.dll") - if os.path.lexists(link_dir + "/dxgi.dll"): - os.remove(link_dir + "/dxgi.dll") - os.symlink(dll_dir + "/d3d11.dll", link_dir + "/d3d11.dll") - os.symlink(dll_dir + "/dxgi.dll", link_dir + "/dxgi.dll") + for f in dxvkfiles: + dst = link_dir + "/" + f + ".dll" + src = dll_dir + "/" + f + ".dll" + if os.path.lexists(dst): + os.remove(dst) + os.symlink(src, dst) - if "wined3d11" in config_opts: - #use gl-based wined3d for d3d11 + if "wined3d" in config_opts: + #use gl-based wined3d for d3d11 and d3d10 make_dxvk_links(basedir + "/dist/lib64/wine/fakedlls/", prefix + "drive_c/windows/system32") make_dxvk_links(basedir + "/dist/lib/wine/fakedlls/", prefix + "drive_c/windows/syswow64") else: - #use vulkan-based dxvk for d3d11 + #use vulkan-based dxvk for d3d11 and d3d10 make_dxvk_links(basedir + "/dist/lib64/wine/dxvk/", prefix + "drive_c/windows/system32") make_dxvk_links(basedir + "/dist/lib/wine/dxvk/", prefix + "drive_c/windows/syswow64") - dlloverrides["dxgi"] = "n" - dlloverrides["d3d11"] = "n" + for f in dxvkfiles: + dlloverrides[f] = "n" if "nod3d11" in config_opts: dlloverrides["d3d11"] = "" diff --git a/user_settings.sample.py b/user_settings.sample.py index 084f0c5b..487a7a8d 100755 --- a/user_settings.sample.py +++ b/user_settings.sample.py @@ -9,8 +9,8 @@ user_settings = { #Enable DXVK's HUD # "DXVK_HUD": "devinfo,fps", - #Use wined3d for d3d11 instead of dxvk -# "PROTON_USE_WINED3D11": "1", + #Use gl-based wined3d for d3d11 and d3d10 instead of vulkan-based dxvk +# "PROTON_USE_WINED3D": "1", #Disable d3d11 entirely # "PROTON_NO_D3D11": "1", From 341bdd229643286fbcbda1277a6764372a0fb96d Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Mon, 15 Oct 2018 13:52:12 -0500 Subject: [PATCH 6/9] update dxvk to 0.90 --- dxvk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dxvk b/dxvk index 38d6268c..6558b275 160000 --- a/dxvk +++ b/dxvk @@ -1 +1 @@ -Subproject commit 38d6268cc4a622bf95efc0bf43075edf27b3c59b +Subproject commit 6558b275824e57131b0214ae33abd82e8d1d34c3 From aaaef10ccb43e9aedd0d529a33c082f541f1a315 Mon Sep 17 00:00:00 2001 From: Seppo Yli-Olli Date: Mon, 15 Oct 2018 17:51:29 +0300 Subject: [PATCH 7/9] Simplify XDG_CONFIG_HOME handling --- proton | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/proton b/proton index 93294658..775862e7 100755 --- a/proton +++ b/proton @@ -290,10 +290,7 @@ with prefix_lock: vr_config is None or \ vr_log is None: try: - if "XDG_CONFIG_HOME" in os.environ: - path = os.environ["XDG_CONFIG_HOME"] - else: - path = os.environ["HOME"] + "/.config" + path = os.environ.get("XDG_CONFIG_HOME", os.environ["HOME"] + "/.config") path = path + "/openvr/openvrpaths.vrpath" with open(path, "r") as jfile: From cac3a518bd7ad913d0494dad6fccf1951e902af8 Mon Sep 17 00:00:00 2001 From: NoXPhasma Date: Sun, 7 Oct 2018 15:16:54 +0200 Subject: [PATCH 8/9] Allow override of dlls with WINEDLLOVERRIDES environment variable Proton overrides the environment variable WINEDLLOVERRIDES entirely, this change allows to add own dll overrides. --- proton | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proton b/proton index 775862e7..5002792a 100755 --- a/proton +++ b/proton @@ -373,7 +373,10 @@ for dll in dlloverrides: s = s + ";" + dll + "=" + setting else: s = dll + "=" + setting -env["WINEDLLOVERRIDES"] = s +if "WINEDLLOVERRIDES" in os.environ: + env["WINEDLLOVERRIDES"] = os.environ["WINEDLLOVERRIDES"] + ";" + s +else: + env["WINEDLLOVERRIDES"] = s ARCH_UNKNOWN=0 ARCH_I386=1 From 3a0cbf003868450ea9ec67e54e1c43d9cc32ca4b Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Tue, 16 Oct 2018 08:11:16 -0500 Subject: [PATCH 9/9] update wine --- wine | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wine b/wine index 266d11ab..d992dcb8 160000 --- a/wine +++ b/wine @@ -1 +1 @@ -Subproject commit 266d11ab06d55dc4ca34e5842cc3ab945b6e9b0b +Subproject commit d992dcb8200c704e50f7b19a38ba617c2ed78a61