Open kobutri opened 4 years ago
Mailbox is not supported on my machine, perhaps you're silently falling back to fifo in that case?
In the case of using VK_PRESENT_MODE_FIFO_KHR I'm getting this issue as well, albeit only when the view is in the background. This present mode does not correctly throttle rendering down to 60fps when the vulkan view is in the background. Instead it starts spinning and renders as fast as it can. I'm waiting for the fence passed in to acquireNextImageKHR to enforce throttling, but that doesn't work. (on Windows it actually throttles in the presentKHR function when using a nvidia driver)
What may or may not be related to fifo throttling not working correctly is that I'm reliably getting a crash on a MVK thread inside the ___ZN31MVKQueueCommandBufferSubmission28commitActiveMTLCommandBufferEb_block_invoke function. There is a similar issue like this in OpenGL where swap interval isn't respected when the opengl view is in the background so this may actually be a platform issue rather than a driver / sdk issue.
In windowed mode VK_PRESENT_MODE_MAILBOX_KHR is locked to 60 fps. In fullscreen mode VK_PRESENT_MODE_FIFO_KHR is not locked to 60 fps.