CuarzoSoftware / Louvre

C++ library for building Wayland compositors.
MIT License
506 stars 14 forks source link

Support for linux-drm-syncobj-v1 protocol #67

Open Heus-Sueh opened 1 month ago

Heus-Sueh commented 1 month ago

This protocol fixes almost all flickering, glitches and artifact issues in Wayland on NVIDIA cards.

https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/90

This protocol will allow explicit synchronization of buffers using DRM synchronization objects. While being a protocol that is unlikely to be widely used directly by applications and toolkits themselves, it is an important building block for improving Vulkan and OpenGL drivers.

ehopperdietzel commented 1 month ago

Hi, thanks for the suggestion! I'll try to implement it soon. By the way, are you experiencing that with Louvre? If so, does it happen only with proprietary drivers or with Nouveau as well?

Heus-Sueh commented 1 month ago

Hi, thanks for the suggestion! I'll try to implement it soon. By the way, are you experiencing that with Louvre? If so, does it happen only with proprietary drivers or with Nouveau as well?

I haven't tried it yet, I just suggested it because future Louvre users will benefit from this protocol, since in almost all cases Explict Sync is better

Fox2Code commented 1 month ago

The proprietary driver doesn't support implicit sync, linux-drm-syncobj-v1 is the protocol for explicit sync.

SRM/Louvre somehow worked around issues with the proprietary Nvidia driver in other ways.

ehopperdietzel commented 1 month ago

I haven't tried it yet, I just suggested it because future Louvre users will benefit from this protocol, since in almost all cases Explict Sync is better.

Ok.

SRM/Louvre somehow worked around issues with the proprietary Nvidia driver in other ways.

I don't think so. With my Nvidia card (which is quite old), I haven't experienced those issues when using proprietary drivers, so I guess it's a thing of newer drivers/cards.

Fox2Code commented 1 month ago

Well, as long as stuff work, maybe due to how SRM/Louvre works linux-drm-syncobj-v1 is not a requirement?

Well I don't think implementing linux-drm-syncobj-v1 would hurt.

ehopperdietzel commented 1 month ago

I read that it should be more efficient than the implicit sync mechanism most drivers implement, so I'll definitely add it 😉