roderickc / wine-vulkan

Other
53 stars 7 forks source link

WINE3.4 Failed to open dynamic library "c:\windows\system32\winevulkan.dll" with error 1114 #20

Closed mikeccuk2005 closed 6 years ago

mikeccuk2005 commented 6 years ago

I had little issue right after re-install entire wine all together in 3.4

What was installed VulkanSDK-1.0.51.0-Installer.exe copied winevulkan.json to windows dir make some registry adjustment

.reg file

[HKEY_LOCAL_MACHINE\Software\Khronos\Vulkan\Drivers]
"C:\\Windows\\winevulkan.json"=dword:00000000

[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Khronos\Vulkan\Drivers]
"C:\\Windows\\winevulkan.json"=dword:00000000

As above Already tried with lowercase "windows" and "Windows"

However when I ran wine vulkaninfo

0009:fixme:console:GetConsoleProcessList (0x32fd78,2): stub
===========
VULKAN INFO
===========

Vulkan API Version: 1.0.51

0009:fixme:ver:GetCurrentPackageId (0x32fae8 (nil)): stub
0009:err:vulkan:wine_vk_init Failed to load Wine graphics driver supporting Vulkan.
0009:err:vulkan:wine_vk_init Failed to load Wine graphics driver supporting Vulkan.
INFO: [loader] Code 0 : Located json file "C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_api_dump.json" from registry "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers"
INFO: [loader] Code 0 : Located json file "C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_core_validation.json" from registry "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers"
INFO: [loader] Code 0 : Located json file "C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_monitor.json" from registry "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers"
INFO: [loader] Code 0 : Located json file "C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_object_tracker.json" from registry "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers"
INFO: [loader] Code 0 : Located json file "C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_parameter_validation.json" from registry "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers"
INFO: [loader] Code 0 : Located json file "C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_screenshot.json" from registry "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers"
INFO: [loader] Code 0 : Located json file "C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_standard_validation.json" from registry "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers"
INFO: [loader] Code 0 : Located json file "C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_threading.json" from registry "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers"
INFO: [loader] Code 0 : Located json file "C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_unique_objects.json" from registry "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers"
INFO: [loader] Code 0 : Located json file "C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_vktrace_layer.json" from registry "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers"
INFO: [loader] Code 0 : Located json file "C:\Program Files\RenderDoc\x86\renderdoc.json" from registry "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ImplicitLayers"
INFO: [loader] Code 0 : Found manifest file C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_api_dump.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_core_validation.json, version "1.1.0"
INFO: [loader] Code 0 : Found manifest file C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_monitor.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_object_tracker.json, version "1.1.0"
INFO: [loader] Code 0 : Found manifest file C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_parameter_validation.json, version "1.1.0"
INFO: [loader] Code 0 : Found manifest file C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_screenshot.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_standard_validation.json, version "1.1.1"
INFO: [loader] Code 0 : Encountered meta-layer VK_LAYER_LUNARG_standard_validation
INFO: [loader] Code 0 : Found manifest file C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_threading.json, version "1.1.0"
INFO: [loader] Code 0 : Found manifest file C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_unique_objects.json, version "1.1.0"
INFO: [loader] Code 0 : Found manifest file C:\VulkanSDK\1.0.51.0\Bin32\VkLayer_vktrace_layer.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file C:\Program Files\RenderDoc\x86\renderdoc.json, version "1.0.0"
INFO: [loader] Code 0 : Meta-layer VK_LAYER_LUNARG_standard_validation all 5 component layers appear to be valid.
INFO: [loader] Code 0 : Located json file "C:\Windows\winevulkan.json" from registry "HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\Drivers"
INFO: [loader] Code 0 : Found ICD manifest file C:\Windows\winevulkan.json, version "1.0.0"
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:\Users\david\.jenkins\workspace\LoaderAndValidationLayers\demos\vulkaninfo.c:671: failed with VK_ERROR_INCOMPATIBLE_DRIVER
0009:fixme:console:GetConsoleProcessList (0x32fcd4,2): stub

native vulkaninfo

===========
VULKAN INFO
===========

Vulkan Instance Version: 1.1.70

ERROR: [Loader Message] Code 0 : /usr/lib32/libvulkan_radeon.so: wrong ELF class: ELFCLASS32
WARNING: radv is not a conformant vulkan implementation, testing use only.

And some very long stuffs ...
Presentable Surfaces:
=====================
GPU id       : 0 (AMD RADV POLARIS11 (LLVM 5.0.1))

I am using Arch Linux kernel 4.14.29-1 and RADV as you see above. Wine is installed from the "multilib/wine 3.4-1"

My wine vulkan files in system32

wine/drive_c/windows/system32/vulkan-1-1-0-51-0.dll
wine/drive_c/windows/system32/vulkan-1.dll
wine/drive_c/windows/system32/vulkaninfo-1-1-0-51-0.exe
wine/drive_c/windows/system32/vulkaninfo.exe
wine/drive_c/windows/system32/winevulkan.dll

Anyone got some idea let me know.

Kerrung commented 6 years ago

You need to read this manual: https://github.com/roderickc/wine-vulkan Just scroll page down.

mikeccuk2005 commented 6 years ago

@Kerrung Yes I did, That is why I made my post. I don't see anything missing I checked my JSON, registry, SDK version, wine version.

wine vulkan did found the json, so No issue with the registry that linking the json file. The info indicate that I was using SDK 1.0.51, which is what the README supports

The error indicate something is wrong with winevulkan.dll which is may not relate to my configuration? Since this file is included with wine 3.4

roderickc commented 6 years ago

I will update wine-vulkan later this weekend to merge a patch from upstream, which makes this issue more clear. Basically my guess is that your Linux libvulkan.so.1 (32-bit or 64-bit) was not installed during time of compilation. When that's the case the wine graphics driver fails to load. I expect warnings about that in the output of the configure script as well.

To fix make sure both 32-bit and 64-bit libvulkan is installed, then rerun configure and recompile Wine.

roderickc commented 6 years ago

I contributed some new changes to Wine and updated the instructions on wine-vulkan as well. Basically we now ship our own vulkan-1.dll, so setup should be much simpler now. The only thing you need are the Linux vulkan libraries and then compile Wine as usual.

Usually issues with winevulkan are due to winex11.drv not having been compiled with Vulkan support, because vulkan libraries were not discovered during compilation by the configure script.

mikeccuk2005 commented 6 years ago

So you are saying that libvulkan is built into winevulkan.dll? Also does it matter if I have vulkan 1.1.70 on my Linux while the wine SDK is 1.0.51?

$ vulkaninfo | grep -e version
WARNING: radv is not a conformant vulkan implementation, testing use only.
VK_LAYER_LUNARG_standard_validation (LunarG Standard Validation) Vulkan version 1.1.70, layer version 1
VK_LAYER_GOOGLE_threading (Google Validation Layer) Vulkan version 1.1.70, layer version 1
VK_LAYER_LUNARG_parameter_validation (LunarG Validation Layer) Vulkan version 1.1.70, layer version 1
VK_LAYER_GOOGLE_unique_objects (Google Validation Layer) Vulkan version 1.1.70, layer version 1
VK_LAYER_LUNARG_object_tracker (LunarG Validation Layer) Vulkan version 1.1.70, layer version 1
VK_LAYER_LUNARG_core_validation (LunarG Validation Layer) Vulkan version 1.1.70, layer version 1
roderickc commented 6 years ago

The design for Vulkan in Wine is like: vulkan-1 -> winevulkan -> winex11.drv -> libvulkan.so.1 -> Linux graphics driver.

It is winex11.drv which loads the native vulkan library, but we need to determine the name of the Vulkan library during configure. If we can't find the library then winex11.drv is not compiled with vulkan support enabled. This then results in winevulkan not being able to load vulkan support from winex11.drv.

The native Vulkan version won't mater. Basically Wine currently is at a lower version, so the end result is that functionality not offered yet in Wine gets 'filtered out'. This amounts to various extensions.

mikeccuk2005 commented 6 years ago

I tried the new build last night using this AUR

https://aur.archlinux.org/packages/wine-vulkan-git/

Which links to your repo With some interesting findings: The cube.exe works wine vulkaninfo.exe having some strange errors, which reports same error when using dxvk Some games like Elder Scrolls Online refuses to work. Benchmark like Heaven 4.0 works fine.

Especially ERROR: [loader] Code 0 : loaderGetRegistryFiles: failed to open DevNode Other than that I am able too see usual outputs Tried vulkansdk 1.0.51 and 1.0.68 giving me same results https://pastebin.com/dl/A3Fj8s9b

wine debug:

0095:fixme:setupapi:CM_Get_Device_ID_List_SizeA 0x32edbc "{4d36e968-e325-11ce-bfc1-08002be10318}" 0x00000300: stub
0095:fixme:setupapi:CM_Get_Device_ID_ListA "{4d36e968-e325-11ce-bfc1-08002be10318}" 0x14d798 0 0x00000300: stub
0095:fixme:setupapi:CM_Locate_DevNodeA 0x32edc0 "X\x01\x11" 0x00000000: stub
0095:fixme:setupapi:CM_Locate_DevNodeA 0x32edc0 "H\x01\x11" 0x00000000: stub
0095:fixme:setupapi:CM_Locate_DevNodeA 0x32edc0 "X\xe1\x14" 0x00000000: stub
0095:fixme:setupapi:CM_Locate_DevNodeA 0x32edc0 "8\x01\x11" 0x00000000: stub
0095:fixme:setupapi:CM_Locate_DevNodeA 0x32edc0 "Q" 0x00000000: stub
0095:fixme:vulkan:wine_vk_instance_convert_create_info Application requested a linked structure of type 0x3b9af4f8.
WARNING: radv is not a conformant vulkan implementation, testing use only.
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetPhysicalDeviceDisplayPropertiesKHR".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetPhysicalDeviceDisplayPlanePropertiesKHR".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetDisplayPlaneSupportedDisplaysKHR".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetDisplayModePropertiesKHR".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkCreateDisplayModeKHR".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetDisplayPlaneCapabilitiesKHR".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkCreateDisplayPlaneSurfaceKHR".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkCreateSharedSwapchainsKHR".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetPhysicalDeviceExternalBufferPropertiesKHR".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetPhysicalDeviceExternalFencePropertiesKHR".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetPhysicalDeviceSurfaceCapabilities2KHR".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetPhysicalDeviceSurfaceFormats2KHR".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkCreateDebugReportCallbackEXT".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDestroyDebugReportCallbackEXT".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDebugReportMessageEXT".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDebugMarkerSetObjectTagEXT".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDebugMarkerSetObjectNameEXT".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetPhysicalDeviceExternalImageFormatPropertiesNV".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetDeviceGroupSurfacePresentModesKHX".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetPhysicalDevicePresentRectanglesKHX".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkEnumeratePhysicalDeviceGroupsKHX".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkReleaseDisplayEXT".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetPhysicalDeviceSurfaceCapabilities2EXT".
0095:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkGetPhysicalDeviceMultisamplePropertiesEXT".
0095:fixme:console:GetConsoleProcessList (0x32fc8c,2): stub
roderickc commented 6 years ago

I think things are working okay from winevulkan perspective. The registry warnings are harmless (windows has some registry keys, wine doesn't have). The unsupported function messages are harmless as well. Basically the windows vulkan-1.dll loads every function it knows about upfront, most are not used. We just print a warning at this point. Both warnings can be silenced on wine 3.5 if using the minimal loader built into wine now (set vulkan-1 to builtin), though windows vulkan-1 has slightly more functionality.