Metal VSync Not Working

Reproduce:

  • Run game in standalone (-game) or run packaged app
  • Enter console
  • stat fps
  • r.vsync 0
  • Note fps
  • r.vsync 1
  • Compare fps

Expected:

  • Vsync should limit fps to monitor refresh rate

It seems like vsync is not currently implemented as can be seen in MetalViewport.cpp → FMetalDynamicRHI::RHIEndDrawingViewport where the bLockToVsync argument is unused

Hello degreshofer,

Can you provide me with the device you are testing, whether or not this is a code based or blueprint project, and your Project Settings > Platforms > iOS?

There are a few settings that could be affecting this which you might want to double-check. Within Project Settings > Engine > General Settings > Framerate there is a settings called Smooth Frame Rate which is enabled by default. Be sure to disable this so your project is not limiting its framerate between the Smoothed Frame Rate Range.

There is also a setting within the iOS section called Frame Rate Lock which helps with power consumption.

Let me know if you have further questions or need additional assistance.

Cheers,

Hello Andrew, this is on a PC running macOS 10.11.6 (Hackintosh) with NVIDIA web drivers to test Mac builds, target platform is just Mac, on a code based project and framerate smoothing is off.

I just tested and it also does not work using -opengl in macOS 10.11.6 but it works under Linux Ubuntu 16.04 on the same PC so this might indeed be just my setup.

So I am not going to be able to run a test on the set up you are mentioning as it is not really an official or supported platform. If you can reproduce the issue on an actual Mac machine using the 10.11.6 OS X and the same Nvidia web drivers, then I will be able to assist you further.

That’s perfectly fine, sorry for the hassle. It would just be great to know if it works in general on Mac but I can’t test this right now so I will just hope it does. Thanks.

I just ran a quick test on the Mac we have here using Nvidia web drivers and it worked as expected within the editor and standalone. Further tests would be needed to verify the device also accepts the console variable.

Thanks,

Great, in that case please consider this issue as resolved. Cheers.