mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-07-29 16:41:53 +03:00
dxvk-nvapi: Add to Proton
Add https://github.com/jp7677/dxvk-nvapi as a submodule. dxvk-nvapi will not be copied into Proton prefixes by default, but instead will be controlled via the environment variable PROTON_ENABLE_NVAPI. This is done to avoid any potential adverse effects of the nvapi DLL existing in cases where an application may require a function that is not implemented by dxvk-nvapi. This new functionality can be enabled by setting the following environment variable to a value of `1`: `PROTON_ENABLE_NVAPI` This functionality is needed in order to support DLSS within Proton. Reviewed-by: Adam Moss <amoss@nvidia.com>
This commit is contained in:
parent
aeecd6e2e9
commit
9e555b222c
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -31,3 +31,6 @@
|
||||
[submodule "OpenXR-SDK"]
|
||||
path = OpenXR-SDK
|
||||
url = https://github.com/KhronosGroup/OpenXR-SDK
|
||||
[submodule "dxvk-nvapi"]
|
||||
path = dxvk-nvapi
|
||||
url = https://github.com/jp7677/dxvk-nvapi
|
||||
|
8
Makefile
8
Makefile
@ -160,6 +160,14 @@ dxvk: configure
|
||||
cp -f $(BUILD_DIR)/dist/files/lib64/wine/dxvk/*.dll /vagrant/dxvk/lib64/wine/dxvk/ && \
|
||||
find /vagrant/dxvk/ -type f -name "*.dll" -printf "%p\0" | xargs --verbose -0 -r -P8 -n3 proton/make/pefixup.py'
|
||||
|
||||
dxvk-nvapi: configure
|
||||
mkdir -p vagrant_share/dxvk-nvapi/lib/wine/nvapi/
|
||||
mkdir -p vagrant_share/dxvk-nvapi/lib64/wine/nvapi/
|
||||
vagrant ssh -c 'make -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) dxvk-nvapi && \
|
||||
cp -f $(BUILD_DIR)/dist/files/lib/wine/nvapi/*.dll /vagrant/dxvk-nvapi/lib/wine/nvapi/ && \
|
||||
cp -f $(BUILD_DIR)/dist/files/lib64/wine/nvapi/*.dll /vagrant/dxvk-nvapi/lib64/wine/nvapi/ && \
|
||||
find /vagrant/dxvk-nvapi/ -type f -name "*.dll" -printf "%p\0" | xargs --verbose -0 -r -P8 -n3 proton/make/pefixup.py'
|
||||
|
||||
vkd3d-proton: configure
|
||||
mkdir -p vagrant_share/vkd3d-proton/lib/wine/vkd3d-proton/
|
||||
mkdir -p vagrant_share/vkd3d-proton/lib64/wine/vkd3d-proton/
|
||||
|
@ -277,6 +277,7 @@ the Wine prefix. Removing the option will revert to the previous behavior.
|
||||
| <tt>noesync</tt> | <tt>PROTON_NO_ESYNC</tt> | Do not use eventfd-based in-process synchronization primitives. |
|
||||
| <tt>nofsync</tt> | <tt>PROTON_NO_FSYNC</tt> | Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no `FUTEX_WAIT_MULTIPLE` support.) |
|
||||
| <tt>noxim</tt> | <tt>PROTON_NO_XIM</tt> | Enabled by default. Do not attempt to use XIM (X Input Methods) support. XIM support is known to cause crashes with libx11 older than version 1.7. |
|
||||
| <tt>enablenvapi</tt> | <tt>PROTON_ENABLE_NVAPI</tt> | Enable NVIDIA's NVAPI GPU support library. |
|
||||
| <tt>nativevulkanloader</tt> | | Use the Vulkan loader shipped with the game instead of Proton's built-in Vulkan loader. This breaks VR support, but is required by a few games. |
|
||||
| <tt>forcelgadd</tt> | <tt>PROTON_FORCE_LARGE_ADDRESS_AWARE</tt> | Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default. |
|
||||
| <tt>heapdelayfree</tt>| <tt>PROTON_HEAP_DELAY_FREE</tt>| Delay freeing some memory, to work around application use-after-free bugs. |
|
||||
|
@ -699,6 +699,32 @@ $(OBJ)/.dxvk-post-build32:
|
||||
touch $@
|
||||
|
||||
|
||||
##
|
||||
## dxvk-nvapi
|
||||
##
|
||||
|
||||
DXVK_NVAPI_MESON_ARGS32 = \
|
||||
--bindir=$(DXVK_NVAPI_DST32)/lib/wine/nvapi \
|
||||
--cross-file=$(DXVK_NVAPI_OBJ32)/build-win32.txt
|
||||
DXVK_NVAPI_MESON_ARGS64 = \
|
||||
--bindir=$(DXVK_NVAPI_DST64)/lib64/wine/nvapi \
|
||||
--cross-file=$(DXVK_NVAPI_OBJ64)/build-win64.txt
|
||||
|
||||
$(eval $(call rules-source,dxvk-nvapi,$(SRCDIR)/dxvk-nvapi))
|
||||
$(eval $(call rules-meson,dxvk-nvapi,32))
|
||||
$(eval $(call rules-meson,dxvk-nvapi,64))
|
||||
|
||||
$(OBJ)/.dxvk-nvapi-post-build64:
|
||||
mkdir -p "$(DST_DIR)"/lib64/wine/nvapi
|
||||
rm -f "$(DST_DIR)"/lib64/wine/nvapi/version && if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- dxvk-nvapi ) > "$(DST_DIR)"/lib64/wine/nvapi/version; fi
|
||||
touch $@
|
||||
|
||||
$(OBJ)/.dxvk-nvapi-post-build32:
|
||||
mkdir -p "$(DST_DIR)"/lib/wine/nvapi
|
||||
rm -f "$(DST_DIR)"/lib/wine/nvapi/version && if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- dxvk-nvapi ) > "$(DST_DIR)"/lib/wine/nvapi/version; fi
|
||||
touch $@
|
||||
|
||||
|
||||
##
|
||||
## vkd3d-proton
|
||||
##
|
||||
|
1
dxvk-nvapi
Submodule
1
dxvk-nvapi
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit fcd8ce2a0e5eef81148cedcb572fe6d1e667da94
|
20
proton
20
proton
@ -449,6 +449,7 @@ class CompatData:
|
||||
|
||||
use_wined3d = "wined3d" in g_session.compat_config
|
||||
use_dxvk_dxgi = not ("WINEDLLOVERRIDES" in g_session.env and "dxgi=b" in g_session.env["WINEDLLOVERRIDES"])
|
||||
use_nvapi = 'enablenvapi' in g_session.compat_config
|
||||
|
||||
builtin_dll_copy = os.environ.get("PROTON_DLL_COPY",
|
||||
#dxsetup redist
|
||||
@ -493,6 +494,7 @@ class CompatData:
|
||||
str(use_wined3d),
|
||||
str(use_dxvk_dxgi),
|
||||
builtin_dll_copy,
|
||||
str(use_nvapi),
|
||||
))
|
||||
|
||||
if old_ver == CURRENT_PREFIX_VERSION:
|
||||
@ -586,6 +588,23 @@ class CompatData:
|
||||
self.prefix_dir + "drive_c/windows/syswow64/" + f + ".dll")
|
||||
g_session.dlloverrides[f] = "n"
|
||||
|
||||
# If the user requested the NVAPI be available, copy it into place.
|
||||
# If they didn't, clean up any stray nvapi DLLs.
|
||||
if use_nvapi:
|
||||
try_copy(g_proton.lib64_dir + "wine/nvapi/nvapi64.dll",
|
||||
self.prefix_dir + "drive_c/windows/system32/nvapi64.dll")
|
||||
try_copy(g_proton.lib_dir + "wine/nvapi/nvapi.dll",
|
||||
self.prefix_dir + "drive_c/windows/syswow64/nvapi.dll")
|
||||
g_session.dlloverrides["nvapi64"] = "n"
|
||||
g_session.dlloverrides["nvapi"] = "n"
|
||||
else:
|
||||
nvapi64_dll = self.prefix_dir + "drive_c/windows/system32/nvapi64.dll"
|
||||
nvapi32_dll = self.prefix_dir + "drive_c/windows/syswow64/nvapi.dll"
|
||||
if os.path.exists(nvapi64_dll):
|
||||
os.unlink(nvapi64_dll)
|
||||
if os.path.exists(nvapi32_dll):
|
||||
os.unlink(nvapi32_dll)
|
||||
|
||||
try_copy(g_proton.lib64_dir + "wine/vkd3d-proton/d3d12.dll",
|
||||
self.prefix_dir + "drive_c/windows/system32/d3d12.dll")
|
||||
try_copy(g_proton.lib_dir + "wine/vkd3d-proton/d3d12.dll",
|
||||
@ -751,6 +770,7 @@ class Session:
|
||||
self.check_environment("PROTON_SET_GAME_DRIVE", "gamedrive")
|
||||
self.check_environment("PROTON_NO_XIM", "noxim")
|
||||
self.check_environment("PROTON_HEAP_DELAY_FREE", "heapdelayfree")
|
||||
self.check_environment("PROTON_ENABLE_NVAPI", "enablenvapi")
|
||||
|
||||
if "noesync" in self.compat_config:
|
||||
self.env.pop("WINEESYNC", "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user