Update DXVK to v0.80 and build as native .so
This commit is contained in:
parent
ffbb969860
commit
f85b734f66
4 changed files with 100 additions and 46 deletions
|
@ -290,6 +290,21 @@ function build_wine64
|
||||||
INSTALL_PROGRAM_FLAGS="$INSTALL_PROGRAM_FLAGS" STRIP="$STRIP" $AMD64_WRAPPER make prefix="$TOOLS_DIR64" libdir="$TOOLS_DIR64/lib64" dlldir="$TOOLS_DIR64/lib64/wine" install-dev install-lib
|
INSTALL_PROGRAM_FLAGS="$INSTALL_PROGRAM_FLAGS" STRIP="$STRIP" $AMD64_WRAPPER make prefix="$TOOLS_DIR64" libdir="$TOOLS_DIR64/lib64" dlldir="$TOOLS_DIR64/lib64/wine" install-dev install-lib
|
||||||
rm -f "$DST_DIR"/bin/{msiexec,notepad,regedit,regsvr32,wineboot,winecfg,wineconsole,winedbg,winefile,winemine,winepath}
|
rm -f "$DST_DIR"/bin/{msiexec,notepad,regedit,regsvr32,wineboot,winecfg,wineconsole,winedbg,winefile,winemine,winepath}
|
||||||
rm -rf "$DST_DIR/share/man/"
|
rm -rf "$DST_DIR/share/man/"
|
||||||
|
|
||||||
|
mkdir -p "$TOOLS_DIR64"/lib/pkgconfig/
|
||||||
|
cat > "$TOOLS_DIR64"/lib/pkgconfig/proton.pc <<EOF
|
||||||
|
prefix=$TOOLS_DIR64
|
||||||
|
exec_prefix=\${prefix}
|
||||||
|
libdir=\${exec_prefix}/lib64
|
||||||
|
includedir=\${prefix}/include
|
||||||
|
|
||||||
|
Name: Proton
|
||||||
|
Description: Proton
|
||||||
|
Requires:
|
||||||
|
Version: 3.16
|
||||||
|
Libs: -L\${libdir} -L\${libdir}/wine
|
||||||
|
Cflags: -I\${includedir} -I\${includedir}/wine -I\${includedir}/wine/windows
|
||||||
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_wine32
|
function build_wine32
|
||||||
|
@ -314,6 +329,19 @@ function build_wine32
|
||||||
if [ "$PLATFORM" != "Darwin" ]; then
|
if [ "$PLATFORM" != "Darwin" ]; then
|
||||||
cp -a bin/wine-preloader "$DST_DIR"/bin/
|
cp -a bin/wine-preloader "$DST_DIR"/bin/
|
||||||
fi
|
fi
|
||||||
|
cat > "$TOOLS_DIR32"/lib/pkgconfig/proton.pc <<EOF
|
||||||
|
prefix=$TOOLS_DIR32
|
||||||
|
exec_prefix=\${prefix}
|
||||||
|
libdir=\${exec_prefix}/lib
|
||||||
|
includedir=\${prefix}/include
|
||||||
|
|
||||||
|
Name: Proton
|
||||||
|
Description: Proton
|
||||||
|
Requires:
|
||||||
|
Version: 3.16
|
||||||
|
Libs: -L\${libdir} -L\${libdir}/wine
|
||||||
|
Cflags: -I\${includedir} -I\${includedir}/wine -I\${includedir}/wine/windows
|
||||||
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_lsteamclient64
|
function build_lsteamclient64
|
||||||
|
@ -448,33 +476,58 @@ function build_dxvk
|
||||||
{
|
{
|
||||||
#unfortunately the Steam chroots are too old to build DXVK, so we have to
|
#unfortunately the Steam chroots are too old to build DXVK, so we have to
|
||||||
#build it in the host system
|
#build it in the host system
|
||||||
if [ ! -e "$TOP/build/dxvk.win64/bin/d3d11.dll" ]; then
|
if [ ! -e "$TOP/build/dxvk.win64/lib/dxgi.dll.so" ]; then
|
||||||
cd "$TOP"/dxvk
|
cd "$TOP"/dxvk
|
||||||
mkdir -p "$TOP"/build/dxvk.win32
|
mkdir -p "$TOP"/build/dxvk.win32
|
||||||
cd "$TOP"/dxvk
|
PATH="$TOP/glslang/bin/:$TOP/build/tools.win32/bin/:$PATH" \
|
||||||
PATH="$TOP/glslang/bin/:$PATH" meson --strip --buildtype="release" --prefix="$TOP"/build/dxvk.win32 --cross-file build-win32.txt "$TOP"/build/dxvk.win32
|
PKG_CONFIG_PATH=$TOOLS_DIR32/lib/pkgconfig/ \
|
||||||
|
meson \
|
||||||
|
--strip \
|
||||||
|
--buildtype="release" \
|
||||||
|
--prefix="$TOP"/build/dxvk.win32 \
|
||||||
|
--cross-file build-wine32.txt \
|
||||||
|
"$TOP"/build/dxvk.win32
|
||||||
cd "$TOP"/build/dxvk.win32
|
cd "$TOP"/build/dxvk.win32
|
||||||
PATH="$TOP/glslang/bin/:$PATH" ninja
|
PATH="$TOP/glslang/bin/:$TOP/build/tools.win32/bin/:$PATH" ninja
|
||||||
PATH="$TOP/glslang/bin/:$PATH" ninja install
|
PATH="$TOP/glslang/bin/:$TOP/build/tools.win32/bin/:$PATH" ninja install
|
||||||
|
|
||||||
cd "$TOP"/dxvk
|
cd "$TOP"/dxvk
|
||||||
mkdir -p "$TOP"/build/dxvk.win64
|
mkdir -p "$TOP"/build/dxvk.win64
|
||||||
PATH="$TOP/glslang/bin/:$PATH" meson --strip --buildtype="release" --prefix="$TOP"/build/dxvk.win64 --cross-file build-win64.txt "$TOP"/build/dxvk.win64
|
PATH="$TOP/glslang/bin/:$TOP/build/tools.win64/bin/:$PATH" \
|
||||||
|
PKG_CONFIG_PATH=$TOOLS_DIR64/lib/pkgconfig/ \
|
||||||
|
meson \
|
||||||
|
--strip \
|
||||||
|
--buildtype="release" \
|
||||||
|
--prefix="$TOP"/build/dxvk.win64 \
|
||||||
|
--cross-file build-wine64.txt \
|
||||||
|
"$TOP"/build/dxvk.win64
|
||||||
cd "$TOP"/build/dxvk.win64
|
cd "$TOP"/build/dxvk.win64
|
||||||
PATH="$TOP/glslang/bin/:$PATH" ninja
|
PATH="$TOP/glslang/bin/:$TOP/build/tools.win64/bin/:$PATH" ninja
|
||||||
PATH="$TOP/glslang/bin/:$PATH" ninja install
|
PATH="$TOP/glslang/bin/:$TOP/build/tools.win64/bin/:$PATH" ninja install
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$TOP"
|
cd "$TOP"
|
||||||
mkdir -p "$DST_DIR"/lib64/wine/dxvk
|
mkdir -p "$DST_DIR"/lib64/wine/dxvk
|
||||||
cp "$TOP/build/dxvk.win64/bin/dxgi.dll" "$DST_DIR"/lib64/wine/dxvk/
|
cp "$TOP"/build/dxvk.win64/lib/*.dll.so "$DST_DIR"/lib64/wine/dxvk/
|
||||||
cp "$TOP/build/dxvk.win64/bin/d3d11.dll" "$DST_DIR"/lib64/wine/dxvk/
|
|
||||||
git submodule status -- dxvk > "$DST_DIR"/lib64/wine/dxvk/version
|
git submodule status -- dxvk > "$DST_DIR"/lib64/wine/dxvk/version
|
||||||
|
#move replaced .dll.sos into a wined3d directory
|
||||||
|
mkdir -p "$DST_DIR"/lib64/wine/wined3d
|
||||||
|
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
|
||||||
|
|
||||||
mkdir -p "$DST_DIR"/lib/wine/dxvk
|
mkdir -p "$DST_DIR"/lib/wine/dxvk
|
||||||
cp "$TOP/build/dxvk.win32/bin/dxgi.dll" "$DST_DIR"/lib/wine/dxvk/
|
cp "$TOP"/build/dxvk.win32/lib/*.dll.so "$DST_DIR"/lib/wine/dxvk/
|
||||||
cp "$TOP/build/dxvk.win32/bin/d3d11.dll" "$DST_DIR"/lib/wine/dxvk/
|
|
||||||
git submodule status -- dxvk > "$DST_DIR"/lib/wine/dxvk/version
|
git submodule status -- dxvk > "$DST_DIR"/lib/wine/dxvk/version
|
||||||
|
#move replaced .dll.sos into a wined3d directory
|
||||||
|
mkdir -p "$DST_DIR"/lib/wine/wined3d
|
||||||
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -609,9 +662,9 @@ fi
|
||||||
case "$BUILD_COMPONENTS" in
|
case "$BUILD_COMPONENTS" in
|
||||||
"all")
|
"all")
|
||||||
build_openal
|
build_openal
|
||||||
build_dxvk
|
|
||||||
build_wine64
|
build_wine64
|
||||||
build_wine32
|
build_wine32
|
||||||
|
build_dxvk
|
||||||
build_lsteamclient64
|
build_lsteamclient64
|
||||||
build_lsteamclient32
|
build_lsteamclient32
|
||||||
build_vrclient64
|
build_vrclient64
|
||||||
|
@ -659,8 +712,8 @@ if [ "$PACKAGE" = true ]; then
|
||||||
WINEPREFIX="$TOP"/build/dist/share/default_pfx/ $RUNTIME_RUNSH ./build/dist/bin/wine64 wineboot
|
WINEPREFIX="$TOP"/build/dist/share/default_pfx/ $RUNTIME_RUNSH ./build/dist/bin/wine64 wineboot
|
||||||
WINEPREFIX="$TOP"/build/dist/share/default_pfx/ $RUNTIME_RUNSH ./build/dist/bin/wineserver -w
|
WINEPREFIX="$TOP"/build/dist/share/default_pfx/ $RUNTIME_RUNSH ./build/dist/bin/wineserver -w
|
||||||
|
|
||||||
cp -a openvr/bin/win32/openvr_api.dll "$TOP"/build/dist/lib/wine/dxvk/openvr_api_dxvk.dll
|
cp -a openvr/bin/linux32/libopenvr_api.so "$TOP"/build/dist/lib/libopenvr_api_dxvk.so
|
||||||
cp -a openvr/bin/win64/openvr_api.dll "$TOP"/build/dist/lib64/wine/dxvk/openvr_api_dxvk.dll
|
cp -a openvr/bin/linux64/libopenvr_api.so "$TOP"/build/dist/lib64/libopenvr_api_dxvk.so
|
||||||
|
|
||||||
setup_wine_gecko "2.47" "x86"
|
setup_wine_gecko "2.47" "x86"
|
||||||
setup_wine_gecko "2.47" "x86_64"
|
setup_wine_gecko "2.47" "x86_64"
|
||||||
|
|
2
dxvk
2
dxvk
|
@ -1 +1 @@
|
||||||
Subproject commit a3e75bf2a9556653bc2f0d3f51fa6af578ee0d92
|
Subproject commit d3c41c1fc93af58763400e0b7a0ccd6c5e7a0c26
|
57
proton.in
57
proton.in
|
@ -48,6 +48,32 @@ def upgrade_pfx(old_ver):
|
||||||
log("Detected broken 64-bit-only installation, re-creating prefix.")
|
log("Detected broken 64-bit-only installation, re-creating prefix.")
|
||||||
shutil.rmtree(prefix)
|
shutil.rmtree(prefix)
|
||||||
|
|
||||||
|
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):
|
def run_wine(args):
|
||||||
subprocess.call(args, env=env, stderr=lfile)
|
subprocess.call(args, env=env, stderr=lfile)
|
||||||
|
|
||||||
|
@ -167,6 +193,11 @@ check_environment("PROTON_NO_ESYNC", "noesync")
|
||||||
if not "noesync" in config_opts:
|
if not "noesync" in config_opts:
|
||||||
env["WINEESYNC"] = "1"
|
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
|
lfile = None
|
||||||
if "SteamGameId" in env:
|
if "SteamGameId" in env:
|
||||||
if env["WINEDEBUG"] != "-all":
|
if env["WINEDEBUG"] != "-all":
|
||||||
|
@ -221,9 +252,6 @@ with prefix_lock:
|
||||||
shutil.copy(basedir + "/dist/lib/wine/fakedlls/vrclient.dll", dst)
|
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/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.
|
#parse linux openvr config and present it in win32 format to the app.
|
||||||
#logic from openvr's CVRPathRegistry_Public::GetPaths
|
#logic from openvr's CVRPathRegistry_Public::GetPaths
|
||||||
|
|
||||||
|
@ -297,29 +325,6 @@ with prefix_lock:
|
||||||
except:
|
except:
|
||||||
log("Unable to write VR config! " + str(sys.exc_info()[1]))
|
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:
|
if "nod3d11" in config_opts:
|
||||||
dlloverrides["d3d11"] = ""
|
dlloverrides["d3d11"] = ""
|
||||||
if "dxgi" in dlloverrides:
|
if "dxgi" in dlloverrides:
|
||||||
|
|
|
@ -650,10 +650,6 @@ static EVRCompositorError ivrcompositor_submit_dxvk(
|
||||||
load_vk_unwrappers();
|
load_vk_unwrappers();
|
||||||
|
|
||||||
vkdata.m_nImage = (uint64_t)image_handle;
|
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_nWidth = image_info.extent.width;
|
||||||
vkdata.m_nHeight = image_info.extent.height;
|
vkdata.m_nHeight = image_info.extent.height;
|
||||||
vkdata.m_nFormat = image_info.format;
|
vkdata.m_nFormat = image_info.format;
|
||||||
|
|
Loading…
Reference in a new issue