mach icon indicating copy to clipboard operation
mach copied to clipboard

mach: vsync modes may be broken

Open emidoots opened this issue 3 years ago • 1 comments

At present we map vsync modes to WebGPU present modes as follows:

https://github.com/hexops/mach/blob/336134c996bde01f8525eb98e97cf92b29030fd6/src/native.zig#L345-L349

Aside from this, we do nothing additional to support these modes. The swap chain usage looks the same. This is likely broken, perhaps we need to do more than specify present modes to achieve say tripple buffering.

  • On Linux+Wayland, specifying .triple results in an uncapped framerate.
  • On macOS, specifying .triple and .none results in a 60FPS refresh rate.

This could also just be a bug/missing feature in Dawn, there has been a lot of work underway in Dawn's swapchain code in recent months and we need to update the Dawn version. https://bugs.chromium.org/p/dawn/issues/detail?id=269&q=present%20mode&can=2

emidoots avatar May 26 '22 17:05 emidoots

can additionally confirm .triple being uncapped on Linux+Xorg

d3m1gd avatar May 27 '22 04:05 d3m1gd

Should be fixed now, see https://github.com/hexops/mach/commit/eb0eceb707b3ead72599bcd5dff432c55ccf7740 for details.

Note that https://github.com/hexops/mach/issues/444 is still an issue, however.

emidoots avatar Aug 18 '22 17:08 emidoots