How vkCreateSwapchainKHR from Image ? Not from surface.

Usually we create surface (vkCreateWin32SurfaceKHR) then create SwapChain from surface.
Interesting, how create SwapChain from Image, but not from surface ?
It is possible ?

What for? Platform dependent Swapchain is useless without platform dependent surface. If you want to just draw to Image just skip the swapchain creation altogether.

If you want to just draw to Image just skip the swapchain creation altogether.
I use Windows 7.
How to do it ?
How draw without swapchain creation ?

I thought that everything falls into SwapChain and then flip to screen.

What do you mean “How draw”?

You can render with Vulkan without any form of display, surface, or swap chain. However, the purpose of surfaces and swap chains is to display images to some form of display device. That’s why they exist.

So, when you say “draw”, do you mean “draw to the screen/window?” If so, the answer is to use a surface and swap chain. If you just want to create an image (perhaps to write to disk or whatever), you don’t need a surface or a swap chain.

Trying to display something without a swap chain sounds like an XY problem. That is, you’re trying to do something, and you believe that the best way to do whatever it is you really want is to render to a display without a swapchain. However, that’s not the best way to do what you want (since you can’t do it), so explain what it is you’re actually trying to do.

Remember from the swapchain you get images to render to.

So if you want to render to an image (to not display) then just set the target image as the rendertarget.

About rendertarget i understood. In Directx 11 i used this method.
I took the word krOoze , like show graphic to display without SwapChain.
And that’s why interested.

He/she was talking about drawing to an image (in-memory representation of a picture) and not about displaying it. Two different things.

Ok.
Fine .

What greyfox said.

Anyway, you can’t provide the VkImage(s) to create the Swapchain. The OS needs to own the VkImages (and you can’t get your dirty paws on them - e.g. never vkDestroy them).

If you need to display your own (ordinary) VkImage you need to draw it as you would any other texture.