Jump to content
  • Advertisement
Sign in to follow this  
cyberpnk

Vulkan Screen Tearing with Vulkan Mailbox Present Mode on Fullscreen

This topic is 472 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Edited by cyberpnk

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Edited by cyberpnk

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!