GPUOpen-Drivers / AMDVLK

AMD Open Source Driver For Vulkan
MIT License
1.69k stars 160 forks source link

wayland: use linux-dmabuf instead of wl_drm #351

Open emersion opened 5 months ago

emersion commented 5 months ago

amdvlk relies on the wl_drm Wayland protocol to find the DRM device used by the compositor. However, wl_drm is a Mesa-private, legacy protocol, and compositors are starting to drop support. amdvlk should use the standard linux-dmabuf protocol from wayland-protocols instead.

Flakebi commented 5 months ago

Thanks for the heads-up. This is tracked in https://github.com/GPUOpen-Drivers/pal/issues/96.

CNR0706 commented 5 months ago

Would implementing linux-dmabuf also allow Tearing on Wayland? Or is this unrelated?

Not super experienced with this. Sorry if that's a dumb question.

jinjianrong commented 1 month ago

Done in 2024.Q4.1 release

mikezackles commented 3 weeks ago

In case anyone else comes across this and does a double-take, it's in the 2024.Q2.1 release notes, so I'm guessing Q4 was a typo. Anyway, thanks!

jinjianrong commented 3 weeks ago

Sorry, this is a typo. The work is done in 2024.Q2.1 release

HurricanePootis commented 1 week ago

I am running AMDVLK 2024.Q2.3 and I am still getting the following error whenever I try to run a wayland application using AMDVLK:

wl_drm#44: error 0: wl_drm.create_prime_buffer is not implemented
jinjianrong commented 1 week ago

Thanks for reporting the issue. We will check it further.

lukelmy commented 1 week ago

Hi @HurricanePootis, thanks for your report. Could you please provide your wayland application or where I can download it?

HurricanePootis commented 6 days ago

@lukelmy

I am running vkcube-wayland, which is apart of the Vulkan-Tools repository.

Also, for more information, I am running the amdvlk driver with the following build process:

  cmake -H. -Bbuilds/Release64 \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_WAYLAND_SUPPORT=On \
    -G Ninja

And, according to the default.xml file in the tar soure code, it is built with PAL commit https://github.com/GPUOpen-Drivers/pal/commit/695337aa8131913d883ff15787cd75f6fcb11229.

Edit: Here is vulkaninfo for my system with the AMDVLK driver