vsync waits only for half the time it should and it produces twice as much frames than it should

I completed both tutorials for https://vulkan-tutorial.com/ and https://vkguide.dev/ and their code makes my render loop twice as fast as the monitor refresh rate. If I’m at 60hz I get 120fps, if I’m at 30hz I get 60fps

It seems like if I change minImageCount from 3 to 2 in the swapchain capabilities I get the proper framerate but then animations look laggy

Could this be a bug in vulkan for mac?

What’s teh present mode? And how do you determine your render rate number?

1 Like

I use VK_PRESENT_MODE_FIFO_KHR and the render rate number I just use the default from VkBootstrap

I mean how do you measure real FPS, an how are you sure about the correctness of the measured value?

  fpsCount++;
  long timeStamp = helpers::getUnixTimestamp();
  if (fpsLastTime < timeStamp - ONE_SECOND)
  {
    fpsLastTime = timeStamp;
    fps = fpsCount == 61 || fpsCount == 59 ? 60 : fpsCount;
    fpsCount = 0;

I use this code, and I compare it with OpenGL which syncs correctly to the vsync. I think this might be a MoltenVK bug, there is more people here with my same issue https://github.com/KhronosGroup/MoltenVK/issues/1407

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.