Warm tip: This article is reproduced from serverfault.com, please click

What Vulkan swapchain does to the window system default framebuffer

发布于 2020-11-29 10:32:40

I have few confusions about vulkan surface and its relation to swapchain and window system. As i have understood VkSurface is an abstraction of window and VkSwapchain is a frame buffers collection that we can present on this window. But as far as i concerned, X11 window system creates a default frame buffer along with window creation. So what happens with this default frame buffer when we create a swapchain? Is it included in a swapchain or deleted? Or maybe swapchain is a wrapper around frame buffers which window system has already created?

Questioner
E1Hephaestus
Viewed
0
krOoze 2020-11-30 04:25:51

IIRC there is no "default framebuffer". The swapchain just creates the number of pixmaps you ask for, and with Present X extension it is similar to how Vulkan abstracts it. You present any of them at will, and X will give you an event when the image gets "idle" and can be used again by you. You can look this stuff up in the mesa driver source code.