Frogging-Family / wine-tkg-git

The wine-tkg build systems, to create custom Wine and Proton builds
856 stars 155 forks source link

[Wine-tkg-git-7.x] [Arch Linux] shared_gpu_resources #1074

Closed ElecTwix closed 11 months ago

ElecTwix commented 11 months ago

with default config when I change shared_gpu_resources to false to true and build gives error

customization.cfg

# 'Wine-to-rule-them-all' - Wine-TkG simple config file

##
##   This config file contains the basic settings of your build.
##   For deeper configuration, see wine-tkg-profiles/advanced-customization.cfg
##

#### NON-MAKEPKG OPTIONS (Won't affect makepkg builds) ####

# Set to the desired installation path for your build(s). A versioned dir containing your build will be created inside that target.
# Example: _nomakepkg_prefix_path="/home/frog" will install your build in /home/frog/wine-tkg-********
_nomakepkg_prefix_path=""

# Set to true to get a prompt after the 64-bit part is built, enabling package switching before building the 32-bit side.
# This is a workaround for distros shipping broken devel packages that can't coexist as multilib
_nomakepkg_midbuild_prompt="false"

# Set to the distro of your choice to attempt dependency resolution. Valid options are "debuntu" (for debian, ubuntu and similar), "fedora" or "archlinux".
_nomakepkg_dep_resolution_distro=""

#### EXTERNAL INSTALLATION SETTINGS - !! ONLY AFFECTS MAKEPKG !! ####

# Set to true to install into external path instead of /usr. This allows you to install multiple different versions in parallel.
# !!! Don't forget that you'll have to use /opt/wine-something/bin/wine instead of just wine (same for winecfg etc.) !!!
_EXTERNAL_INSTALL="false"

#### GENERATE DEBIAN PACKAGE ####
# Set to true if you want to generate a debian package after building. Currently doesn't work with _EXTERNAL_INSTALL option.
# This generates a debian package from build files ready to be packaged.
_GENERATE_DEBIAN_PACKAGE="false"

#### WINE FLAVOUR SETTINGS ####

# Override config with one of the presets from /wine-tkg-profiles dir - Leave empty to get a prompt (legacy profiles won't be listed)
# Set to "none" to silence the prompt
# Custom presets : "fo4", "legacy", "mwo", "sims2", "oldnvidia-sims3", "protonified", "unity".
# Valve presets :  "valve" (builds against current valve proton tree), "valve-exp" (builds against current valve proton-experimental tree), "valve-exp-bleeding" (builds against current valve proton-experimental-bleeding-edge tree)
# Clean presets (untouched) : "mainline", "staging".
_LOCAL_PRESET=""

# Add GloriousEggroll game patches and hotfixes when using a Valve profile with staging enabled
# ! This will only affect Valve + staging trees !
# List of patches applied with this option enabled: assettocorsa-hud killer-instinct-winevulkan_fix FFVII-and-SpecialK-powerprof 65-proton-fake_current_res_patches unity_crash_hotfix Fix-regression-introduced-by-0e7fd41 15aa8c6-fix-star-citizen-bug-52956 0001-winex11.drv-Define-ControlMask-when-not-available 0002-include-Add-THREAD_POWER_THROTTLING_STATE-type 0003-ntdll-Fake-success-for-ThreadPowerThrottlingState
_use_GE_patches="true"

# plain wine commit or version tag if you want to use a specific wine version. Can use e.g. "64d9f30", "wine-3.16" or "wine-4.0"
# !!! Only affects non-staging builds (you want to edit the staging_version below for staging builds) !!!
# Leave empty to use latest master - https://github.com/wine-mirror/wine/commits/master
_plain_version=""

# staging
_use_staging="true"
# staging commit or version tag if you want to use a specific staging version. Can use e.g. "7cfceb7", "v3.16" or "v4.0"
# Leave empty to use latest master - https://github.com/wine-staging/wine-staging/commits/master
_staging_version=""

# NTsync - Disable with WINE_DISABLE_FAST_SYNC=1 envvar - Set to true to enable NTsync support - https://repo.or.cz/wine/zf.git/shortlog/refs/heads/fastsync4
# more info about NTsync and feedback topic - https://github.com/Frogging-Family/wine-tkg-git/issues/936
# !! For building and using requires special linux-tkg build with winesync module and header (or https://aur.archlinux.org/packages/winesync-dkms/) !!
# !! Not compatible with Valve trees and some other patches. On Staging depends on fsync patches !!
# !! For plain Wine required disabling esync and fsync patches applying !!
_use_fastsync="false"

# esync - Enable with WINEESYNC=1 envvar - Set to true to enable esync support on plain wine or wine-staging <4.6 (it got merged in wine-staging 4.6). The option is ignored on wine-staging 4.6+
# You may need to raise your fd limits -> https://github.com/zfigura/wine/blob/esync/README.esync
_use_esync="true"

# fsync - Enable with WINEFSYNC=1 envvar - Set to true to enable fsync support on Wine 5.20 and above - Requires kernel 5.16+ or at least linux-tkg 5.13 - https://github.com/ValveSoftware/wine/pull/128
# !! fsync legacy will be used for Wine 5.19 and lower (Mainline 4.7.r168.g29914d583f / Staging 4.9.r7.g197e08b4) !!
# !! https://steamcommunity.com/games/221410/announcements/detail/2957094910196249305 !!
_use_fsync="true"

# Set to false to add DXVK configuration support to Wine's DXGI, allowing for VKD3D to run while keeping DXVK dxgi functionalities.
# !! For DXVK to work properly with this option set to false, you'll need a DXVK build that comes with dxvk_config.dll !!
# Keep in mind Wine's dxgi can be more unstable and less compatible when used with DXVK.
_dxvk_dxgi="true"

#### GAME-SPECIFIC PATCHES ####

# Enable support for Proton's Battleye runtime - Depends on Battleye runtime
_proton_battleye_support="true"

# Enable support for Proton's EAC bridge - Depends on Easy Anti Cheat runtime
_proton_eac_support="true"

# Mechwarrior Online fix - https://mwomercs.com/forums/topic/268847-running-the-game-on-ubuntu-steam-play/page__st__20__p__6195387#entry6195387
_mwo_fix="false"

# Resident Evil 4 hack - https://bugs.winehq.org/show_bug.cgi?id=46336
_re4_fix="false"

# Child window support for vk - Fixes World of Final Fantasy, CEMU vulkan renderer and others - https://bugs.winehq.org/show_bug.cgi?id=45277
_childwindow_fix="true"

# Shared gpu resources support:
# Shared texture resources for d3d9 and d3d11 - https://github.com/doitsujin/dxvk/pull/2516
# Requires DXVK 1.10.1+
# ID3D11Fence and ID3D12Fence sharing - https://github.com/doitsujin/dxvk/pull/2608 https://github.com/HansKristian-Work/vkd3d-proton/pull/1175
# Requires DXVK 1.10.3+, VKD3D-Proton 2.7+
_shared_gpu_resources="true"

# Fix for LoL 9.20+ crashing - Depends on _use_staging="true" - https://bugs.winehq.org/show_bug.cgi?id=47198 & https://bugs.winehq.org/show_bug.cgi?id=47915 - Requires vdso32 disabled (as root: `echo 0 > /proc/sys/abi/vsyscall32`)
# lol depends on the following staging patches :
# winebuild-Fake_Dlls, ntdll-RtlCreateUserThread, ntdll-NtContinue, ntdll-SystemExtendedProcessInformation, ntdll-SystemModuleInformation, ntdll-ThreadHideFromDebugger, wow64cpu-Wow64Transition, user32-InternalGetWindowIcon, ntdll-Pipe_SpecialCharacters, ntdll-NtDevicePath, ntdll-NtQueryVirtualMemory, fonts-Missing_Fonts, crypt32-CMS_Certificates, bcrypt-ECDHSecretAgreement, winex11-ime-check-thread-data
_lol920_fix="false"

# Fix for Assetto Corsa performance drop when HUD elements are displayed - https://bugs.winehq.org/show_bug.cgi?id=46955 - Create all kind of issues since b7b1ad0 (5.9 devel), so be careful with that.
_assettocorsa_hudperf_fix="false"

# Fixes for Mortal Kombat 11 - Requires staging, _proton_fs_hack="true", native mfplat (win7) or staging mfplat support and a different GPU driver than RADV
# On Wine 5.2 (up to b1c748c8) and lower, it needs to be toogled on with the WINE_LOW_USER_SPACE_LIMIT=1 envvar
_mk11_fix="true"

# Workaround for Final Fantasy XIV Launcher 404 error - Thanks @varris1 ! - Fixed by d535df42f665a097ec721b10fb49d7b18f899be9 (4.10)
# Found to also enable the new launcher (that came with the 5.1 update) to work *with issues*
_ffxivlauncher_fix="false"

# Background music on King of Fighters 98 and 2002 is silent on Wine-staging and the `xactengine-initial` patchset was found to introduce the issue. Set to "true" to disable it as a workaround.
_kof98_2002_BGM_fix="false"

# Fix for Quake Champions by Paul Gofman for Proton - Depends on _protonify="true" and _use_staging="true"
# This patchset breaks Genshin Impact
_quake_champions_fix="false"

#### OTHER PATCHES ####

# launch with dedicated gpu desktop entry patch - makes an additional desktop entry which launches app with DRI_PRIME set to 1 (only for switchable graphics with mesa drivers)
_launch_with_dedicated_gpu="false"

# Joshua Ashton's take on making wine dialogs and menus less win95-ish - https://github.com/Joshua-Ashton/wine/tree/wine-better-theme
_use_josh_flat_theme="true"

#### PROTON PATCHES ####

# Bypass compositor in fullscreen modes - Typically reduces stuttering and improves performance - https://github.com/ValveSoftware/wine/commit/141ba5cf73029029a5a0bd2cdcfd5f9f9ab7ee7b
_FS_bypass_compositor="false"

# Proton Fullscreen patch - Requires 3.16+ for staging and 5.0+ for mainline - Allows resolution changes for fullscreen games without changing desktop resolution
# You can optionally use nearest neighbour upscaling with the WINE_FULLSCREEN_INTEGER_SCALING envvar
_proton_fs_hack="false"

# Proton compatible rawinput patchset - Only effective when _proton_fs_hack is set to "true" - Requires a tree containing 6d7828e8df68178ca662bc618f7598254afcfbe1 (4.20+)
_proton_rawinput="true"

# Enforce mscvrt Dlls to native then builtin - from Proton
_msvcrt_nativebuiltin="false"

# Use Proton's updated win10 versioning and better productid - Necessary to enable d3d12 (for use with vkd3d) in some games
# Also sets the default wine version to win10 (instead of win7) on Wine <8.1
_win10_default="false"

# Other misc proton patches and hacks - Notably contains fixes for some native vk games (such as Doom Eternal) as well as Rockstar launcher
# Also enables some winevulkan performance optimizations - https://github.com/Joshua-Ashton/proton-wine/tree/winevulkan-opt (fs hack) - https://github.com/Joshua-Ashton/wine/commits/winevulkan-opt-mainline (no fs hack)
_protonify="false"

#### USER PATCHES - See README in ./wine-tkg-userpatches dir for instructions ####

# community patches - add patches (separated by a space) of your choice by name from the community-patches dir - https://github.com/Frogging-Family/community-patches
# example: _community_patches="amdags.mypatch GNUTLShack.mypatch"
_community_patches=""

# Automatically update community-patches from git - set to false if you don't want this behaviour, useful for example if you have your own fork.
_community_patches_auto_update="true"

prepare.log

sharedgpures-driver.patch -- ( Applied shared resources driver patchset )
patching file configure.ac
Hunk #1 succeeded at 3035 (offset -36 lines).
patching file dlls/sharedgpures.sys/Makefile.in
patching file dlls/sharedgpures.sys/shared_resource.c
patching file dlls/sharedgpures.sys/sharedgpures.sys.spec
patching file include/ddk/wdm.h
Hunk #1 succeeded at 1833 (offset 15 lines).
patching file loader/wine.inf.in
Hunk #1 succeeded at 200 (offset 13 lines).
Hunk #2 succeeded at 221 (offset 14 lines).
Hunk #3 succeeded at 242 (offset 15 lines).
Hunk #4 succeeded at 263 (offset 16 lines).
Hunk #5 succeeded at 2604 (offset 29 lines).
patching file dlls/sharedgpures.sys/shared_resource.c
patching file dlls/ntoskrnl.exe/ntoskrnl.c
Hunk #1 succeeded at 257 (offset -3 lines).
Hunk #2 succeeded at 275 (offset -3 lines).
patching file server/mapping.c
Hunk #1 succeeded at 159 (offset -1 lines).
Hunk #2 succeeded at 170 (offset -2 lines).
Hunk #3 succeeded at 195 (offset -2 lines).
Hunk #4 succeeded at 900 (offset -5 lines).
Hunk #5 succeeded at 993 (offset -6 lines).
Hunk #6 succeeded at 1101 (offset -6 lines).
patching file dlls/sharedgpures.sys/shared_resource.c
patching file dlls/sharedgpures.sys/shared_resource.c
sharedgpures-textures.patch -- ( Applied shared texture resources support patchset )
patching file dlls/winevulkan/make_vulkan
Hunk #4 FAILED at 211.
Hunk #5 succeeded at 247 (offset 2 lines).
Hunk #6 succeeded at 275 (offset 6 lines).
Hunk #7 succeeded at 1531 (offset 45 lines).
1 out of 7 hunks FAILED -- saving rejects to file dlls/winevulkan/make_vulkan.rej
patching file dlls/winevulkan/vulkan.c
Hunk #2 succeeded at 48 with fuzz 2 (offset -5 lines).
Hunk #3 succeeded at 401 (offset -3 lines).
Hunk #4 succeeded at 420 (offset -3 lines).
Hunk #5 succeeded at 532 (offset -3 lines).
Hunk #6 succeeded at 1386 (offset 5 lines).
Hunk #7 succeeded at 1738 (offset 5 lines).
Hunk #8 FAILED at 1767.
Hunk #9 succeeded at 1790 (offset 5 lines).
Hunk #10 succeeded at 1828 (offset 5 lines).
Hunk #11 succeeded at 1958 (offset 5 lines).
Hunk #12 succeeded at 2054 (offset 53 lines).
Hunk #13 succeeded at 2114 (offset 53 lines).
Hunk #14 succeeded at 2350 (offset 103 lines).
Hunk #15 succeeded at 2377 (offset 103 lines).
1 out of 15 hunks FAILED -- saving rejects to file dlls/winevulkan/vulkan.c.rej
patching file dlls/winevulkan/vulkan_private.h
Hunk #3 succeeded at 359 (offset 21 lines).

last_build_config.log

# Last wine-tkg-staging-fsync-git configuration - Mon Sep 25 07:29:02 PM +03 2023 :

Local cfg files used

Wine (plain) version: 8.16.r150.g56e58cbed19
Using wine-staging patchset (version 8.16.r5.gd2cf8329)

Disabled the local Esync patchset to use Staging impl instead.
Not using vkd3d native library for d3d12 translation (allows using vkd3d-proton)

Done applying backports hotfixes (if any) - list available in prepare.log
Done applying reverting hotfixes (if any) - list available in prepare.log

CSMT-toggle.patch -- ( Applied CSMT toggle logic patch )

Staging overrides, if any: 

fsync-unix-staging.patch -- ( Applied fsync patches (unix, staging) )
fsync_futex_waitv.patch -- ( Applied patches for fsync to support futex_waitv )

childwindow-proton.patch -- ( Applied child window for vk patch )
sharedgpures-driver.patch -- ( Applied shared resources driver patchset )
llde commented 11 months ago

Currently the patchset doesn't work in recent wines.

ElecTwix commented 11 months ago

Thanks for info. Done.

mirh commented 7 months ago

The last working version is 8.5

mirh commented 7 months ago

It's not broken in "any version"? At least thanks to llde's work, it's fine up to wine-staging 8.5. After that I guess you should rebase to account for 0a56a4ada251cd1071acfbbf64a28ec4afdd28c3

Tk-Glitch commented 7 months ago

It is, as it doesn't work. The patches might apply fine but no game relying on the features work, though it works with Valve's.

llde commented 7 months ago

@Tk-Glitch sure? I remember at least some games working before the big winevulkan rewrite upstream. I may try looking at it soon.