egl/wayland: implement SwapInterval > 1

Open Lucas Stach requested to merge lynxeye/mesa:egl-wayland-swapinterval into main

Currently the EGL wayland platform is maximally unhelpful to applications that want to draw at less than the full display refresh rate. Here is my naive implementation of SwapInterval > 1, which seems to work.

However, I'm not enough of a wayland spec lawyer to tell if this is actually safe to do, especially since a (now removed) comment stated "that the only way we be sure to get a frame callback is to attach a new buffer", which I'm certainly not doing here. Maybe @daniels, @emersion or @pq could take a look and tell me if what I'm doing is supported or a blatant abuse of the protocol.

Merge request reports