Open i509VCB opened 1 year ago
Here's the change that fixed wezterm: https://github.com/wez/wezterm/commit/0eeca6c2c52b626fc9d4c9ccf22ee72330e2106a
The summary is: it is important to issue WlSurface::frame prior to calling SurfaceTexture::present
, as the present
call implicitly submits a commit
. If the two are called in the opposite order, the WlSurface::frame
is not committed at the right time, leading to lagging/stalling rendering.
There was a matrix discussion a few days related to wezterm using wgpu directly from Wayland (instead of using winit, although nothing really prevents you from making that mistake in winit either). The particular issue there was
SurfaceTexture::present
submitting awl_surface.commit
message under the hood.There may be similar issues to this on other platforms as well, so we should document what
SurfaceTexture::present
and other surface related functions do under the hood for each platform.When I find some time I will write up the platform dependent stuff around
SurfaceTexture::present
for Wayland.I know on macOS wgpu will set a CALayer but I am not familiar with that.