-
-
Save dblsaiko/8dd1a3d908d8ec4330f29e083e463721 to your computer and use it in GitHub Desktop.
| #!/bin/bash | |
| query_abort() { | |
| printf "==> %s [Y/n] " "$1" | |
| read -n 1 response | |
| case "$response" in | |
| 'Y'|'y'|'') | |
| ;; | |
| *) | |
| printf "\n%s\n" "Aborting." | |
| exit 1 | |
| esac | |
| } | |
| wine --version | grep -q Staging || query_abort "WARNING: Wine Staging not installed. Apparently Vulkan doesn't work that well with normal Wine (as of 3.4). Proceed?" | |
| if [ "x$WINEPREFIX" = "x" ]; then | |
| query_abort "WINEPREFIX is not set. Proceed and use ~/.wine as WINEPREFIX?" | |
| WINEPREFIX="$HOME/.wine" | |
| fi | |
| export WINEPREFIX | |
| set -e | |
| is_wine_64bit() { | |
| test "x$WINEARCH" = "xwin64" && return 0 | |
| test "x$WINEARCH" = "xwin32" && return 1 | |
| which wine64 2> /dev/null > /dev/null | |
| } | |
| install_vulkansdk() { | |
| # Apparently, the winetricks that has 'vulkansdk' is still too new, so we're manually downloading the thing for now | |
| #winetricks vulkansdk | |
| test ! -f /tmp/vulkansdk.exe && | |
| wget -O /tmp/vulkansdk.exe 'https://sdk.lunarg.com/sdk/download/1.0.68.0/windows/VulkanSDK-1.0.68.0-Installer.exe' | |
| wine /tmp/vulkansdk.exe /S | |
| } | |
| setup_cfg() { | |
| cat > "$WINEPREFIX/drive_c/windows/winevulkan.json" <<EOF | |
| { | |
| "file_format_version": "1.0.0", | |
| "ICD": { | |
| "library_path": "c:\\\\windows\\\\system32\\\\winevulkan.dll", | |
| "api_version": "1.0.51" | |
| } | |
| } | |
| EOF | |
| } | |
| setup_registry() { | |
| cat > "/tmp/vulkan.reg" <<EOF | |
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\\SOFTWARE\\Khronos\\Vulkan\\Drivers\\] | |
| "C:\\\\Windows\\\\winevulkan.json"=dword:00000000 | |
| EOF | |
| "wine$1" reg import "/tmp/vulkan.reg" | |
| } | |
| wineboot | |
| install_vulkansdk | |
| setup_cfg | |
| setup_registry | |
| is_wine_64bit && setup_registry 64 | |
| printf "%s\n" "==> Done! Enjoy Vulkan :)" |
Hmm. Does the file c:\windows\system32\winevulkan.dll exist?
I've got some problems too, but different ones. Sorry to cut in. My log ends like this:
0009:err:vulkan:wine_vk_init Failed to load Wine graphics driver supporting Vulkan.
ERROR: [loader] Code 0 : Failed to open dynamic library "c:\windows\system32\winevulkan.dll" with error 1114
Cannot create Vulkan instance.
C:\VulkanSDKBuild\workspace\LoaderAndValidationLayers\demos\vulkaninfo.c:808: failed with VK_ERROR_INCOMPATIBLE_DRIVER
0009:fixme:console:GetConsoleProcessList (0x32fbf8,2): stub
0032:fixme:console:CONSOLE_DefaultHandler Terminating process 8 on event 0
Doesn't matter if I use vulkan-3.3, 3.4, staging-3.4 (these three from Lutris's runners repo; I'm not actually using Lutris itself), or the official 3.4 from the WineHQ PPA. Also doesn't matter if I use your setup script or do it manually after installing the SDK with winetricks.
@Hairo This line looks like it does not find your winevulkan.json file.
loader_get_manifest_files: Registry lookup failed to get ICD manifest files. Possibly missing Vulkan driver?
@TiZ-EX1 I got pretty much the same issue.
From vulkaninfo.exe
Vulkan API Version: 1.0.68
From vulkaninfo (on linux)
Vulkan Instance Version: 1.1.70
Could this be a problem or should this work out?
Could a guy with a working setup post his versions?
sure, mine works, so why not:
OS: Arch Linux
wine version: wine-3.4 (Staging)
wine package: wine-staging 3.4-1
vulkan version (native): 1.1.70
vulkan version (wine): 1.0.68
Just made a new wineprefix and ran the setup script, and then wine vulkaninfo to get that version
Ok, tried again with wine 3.4-staging and it's workng now, was using stable 3.4 before, maybe it doesn't work with the stable branch?
@Hairo samething here. Only worked on the staging version
added a warning when not using staging
Getting this when trying to run vulkaninfo.exe