In the real world, when does a graphic device not have the ability to present to a window?


#1

I like being able to initialize Vulkan without any window. It seems strange that we need to check if a device can present to a window with vkGetPhysicalDeviceSurfaceSupportKHR. Under what circumstances would a graphics device NOT be able to? Is this really necessary?


#2

It does seem strange. Because you don’t have to, and nowhere in the Vulkan specification does it suggest that you do. Why do you think that you need to use this function if you’re not trying to render to a window?

That’s not exactly the question that function answers. It specifically asks whether the given queue family of the given physical device can present to the given surface. Some queues can present; some cannot.


#3

This only concerns graphical applications.

Are there really situations where a queue family would have graphical capabilities, but not have the ability to render to a surface? Are there situations where an application would need separate rendering and presenting queues? I am asking because the tutorial here is talking about separate rendering and presenting queues, but saying it is unlikely: https://vulkan-tutorial.com/Drawing_a_triangle/Presentation


#4

Are there really situations where a queue family would have graphical capabilities, but not have the ability to render to a surface?

Yea. E.g. on OS with Windowing System off (servers? farms?).

Are there situations where an application would need separate rendering and presenting queues?

I don’t think there are currently drivers requiring it. You could get away with not implementing it. Though it is relatively easy to implement; just needs some extra queue family selection and making the images COHERENT between the two queue families.


#5

Then why would you be running a Vulkan graphical program??? :crazy_face:


#6

I believe there is some lack of imagination going on. :smiley:

Unlike (especially older) OpenGL, Vulkan intentionally separates Graphics computation from Presentation. It is up do you to make use of it. You can produce images from Vulkan, and do anything with them (save to disk, send over web, stream it, …). It is not strictly necessary for that to have a Window and Surface, and such app can run on a headless computer.