egl/wayland: Update buffer after resizing

Open Illia Polishchuk requested to merge GL/mesa:egl-wayland-buffer-update-on-resize into main

When we make the surface current, we implicitly create a backbuffer.
Calling wl_egl_window_resize then effectively no-ops within
update_buffers_if_needed as a back buffer exists without recreating it.

KDE on Wayland resizes the window to its current size after initial
resizing and making the surface current.
As a result, the window stays unresized forever

An example of the issue was found inside QT

GNOME on Wayland continually reconfigures size so it appears to fix itself
but the first frame is still wrong.

Other DRI2 implementations, like X11 or Android, always recreate buffers
inside the getBuffers DRI API interface implementation,
because it's more about buffer allocation than buffer extraction,
according to DRI2 docs and comments

It's better to not break this behavior for Wayland
and not break numerous existing codebases which rely on this.

Signed-off-by: Illia Polishchuk
Closes: #7217

Fixes: b5619464

Edited by Illia Polishchuk

Merge request reports