Driver failed to create swapchain if modesetting driver is being used.
davidmaoamd opened this issue · 4 comments
Any XCB/XLIB Vulkan application would fail to create swapchain if X is launched with mode setting driver but not amdgpu's ddx driver.
The AMDVLK driver queries the busid of the master fd to ensure we are rendering with the same GPU on the client side.
However, unlike amdgpu's ddx driver, the mode setting driver does not call drmSetInterfaceVersion to set the unique string of the master fd, which makes the busid queried from the kernel empty.
We would like to raise this issue to X to see if it is proper behavior to not call drmSetInterfaceVersion on the newly opened fd.
In the mean time, please stick with amdgpu's ddx driver on the xserver side as it is our test vehicle.
FYI this is the approach used by radv/intel:
https://cgit.freedesktop.org/mesa/mesa/tree/src/vulkan/wsi/wsi_common_x11.c#n100
Basically we just look at drmGetRenderDeviceNameFromFd for the fd used by the driver and a fd gotten over dri3 and see if those names are equal.
We do that as well for regular case.
But with mode setting driver, it returns fd with nodeType DRM_NODE_PRIMARY.
We cannot use drmGetRenderDeviceNameFromFd on Primary node type.
The issue has been fixed in latest code