https://bugs.winehq.org/show_bug.cgi?id=51210
--- Comment #13 from Vasily Galkin galkin-vv@ya.ru --- Created attachment 71124 --> https://bugs.winehq.org/attachment.cgi?id=71124 code sample for adding vkGetPhysicalDeviceXlibPresentationSupportKHR
If anyone know how vkCreateInstance can be called in a way that returns ICD that is compatible with specific X11 disaply, this maybe can be used to fix the issue.
I was completely wrong here, since I wasn't undestanding how vulkan loader works.
I've started step-by-step debugging with vulkan-loader 1.2.189 and found that pvkGetRandROutputDisplayEXT( vk_physical_devices[device_idx], ... call (in my example or in wine's xrandr.c) initially calls loaders GetRandROutputDisplayEXT that tail-calls terminator_GetRandROutputDisplayEXT that tail-calls into libnvidia-glcore.so.470.86
both GetRandROutputDisplayEXT and terminator_GetRandROutputDisplayEXTdefined in https://github.com/KhronosGroup/Vulkan-Loader/blob/sdk-1.2.189/loader/extens... but are not visible in the stacktrace due to tail-calling.
So my situation is similar to https://bugs.winehq.org/show_bug.cgi?id=49407 But the problem is not "protocol error is returned on bad RROutput" but "crash on non-nvidia Display* ".
Note that 470.86 is the latest driver on 470 "Production" branch, but 470 is NOT the latest branch now. The latest is "NewFeature" 495.44.
I tried to filter out vulkan devices incompatible with a display by adding VK_KHR_xlib_surface to the list of extensions and using vkGetPhysicalDeviceXlibPresentationSupportKHR, that seems to be designed for it according to "Issue 1" in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR...
This works for filtering out "AMD vulkan device and Nvidia display" combination, but fails to filter out "Nvidia vulkan device and AMD display". It seems that vkGetPhysicalDeviceXlibPresentationSupportKHR incorrectly returns true for Nvidia device.
attaching a partial code sample that I used for vkGetPhysicalDeviceXlibPresentationSupportKHR experiments.
Also see the above khronos link for alternative that can be used after creating window.