Overv / VulkanTutorial

Tutorial for the Vulkan graphics and compute API
https://vulkan-tutorial.com
Creative Commons Attribution Share Alike 4.0 International
3.06k stars 511 forks source link

Choosing swapchain present mode #237

Closed alexpanter closed 3 years ago

alexpanter commented 3 years ago

I've been doing some reading concerning what is the appropriate present mode, and I thought the tutorial should link to this discussion: https://github.com/LunarG/VulkanSamples/issues/98

It provides some useful insight on whether to prefer FIFO or MAILBOX as default. E.g. power consumption on mobile devices has been a concern.

alexpanter commented 3 years ago

And reading here:

It seems that VK_PRESENT_MODE_FIFO_KHR can also be used for triple buffering, which seems contradictory to the descriptions for picking presentation mode for the swap chain.

Overv commented 3 years ago

I see now that there are multiple different approaches that are all called triple buffering simply because they use three buffers.

The triple buffering that the tutorial talks about that is only available with MAILBOX is that the GPU is allowed to render multiple frames per vertical sync interval so that the frame being displayed is as "fresh" as possible. That is not the case with the triple buffering described in the Samsung article (nor is any scheme that limits the number of rendered frames to the number of refresh intervals).

It is a good idea to highlight these details, however.