Screen Tearing with Vulkan Mailbox Present Mode on Fullscreen

Started by
2 comments, last by SibylSystem 7 years ago
With the Vulkan mailbox present mode, VK_PRESENT_MODE_MAILBOX_KHR, I seem to be getting bad screen tearing when running in fullscreen mode.
If run the app in a window, it works great (no tearing). I can also set presentMode to VK_PRESENT_MODE_FIFO_KHR, which works and vsyncs, but I'd prefer to use triple buffering w/ the mailbox.
The code I'm running is based on the tutorial here: https://vulkan-tutorial.com/ and all I have added is my own code to handle keyboard/mouse input via GLFW and I'm switching to full screen using glfwSetWindowMonitor.
I checked in the debugger, mailbox mode is available on my hardware and I've set the swap chain minImageCount to 3 (also supported).
I'm new to Vulkan so maybe I missed something obvious, has anyone run into this before?
Windows 10 64-bit, Nvidia GTX 1080, driver 378.49
Advertisement

It's hard to see how it could be anything other than a driver bug.

Unless maybe it isn't vsync screen tearing at all, and is just something that looks similar enough to have tricked you. e.g. Maybe you're missing some important bit of synchronisation and you're changing a texture/vertices/uniforms midway through the screen being rendered. Or maybe there's a bug in your logic somewhere and you're rendering to the on-screen framebuffer instead of the offscreen ones.

I tested the app on my second computer. Strangely enough, it works perfectly fine without any tearing. Using same Nvidia driver but with a Titan XP.

So at least I know the code is working. On my main computer I reinstalled the latest Nvidia driver and tried to disable any services on the computer that could be causing issue but nothing helps.

This issue appears resolved either on the 378.92 Nvidia driver or the 1.0.42.2 VulkanSDK.

This topic is closed to new replies.

Advertisement