Hello,
To create vkdevice, we need to choose only one vkphysicaldevice among all gpus
But, in my desktop computers, I have three gpus. Two are identical nvidia cards. the other one is intel integrated gpu.
Also, I have three monitors. Two are connected to one nvidia card. The other one connected to intel integrated gpu. The remaining nvidia card does not have display
However, when I move my vulkan application from one monitor (to nvidia) to other monitor (to intel) there is no problem and the vulkan application can sit on both monitors at the same time
So I guess,
even though when we create one vkdevice, we must choose only one gpu,
however, vulkan system (vkinstance etc) can take care of rendering application window on both monitors though there may be several issues about objects handling and using the right device ram , that is, that application window should consume two different gpus
But my copilot told me I am wrong
Copilot says, vkdevice always use only one gpu
When I move my application window so that it sits on both monitors at the same time,
Vulkan still use only one vkdevice and one gpu and ms windows will take care of displaying application window on two different monitors
There is confusion about what is the “adapter”/“physical device” due to historical reasons around of how VGA evolved from simple display devices to acomodate the graphics accelerators as draw devices, both forming what would late become the adapters as we have it today. This is actually two idealized devices fused in one. The first and former being the display device, responsible for the presentation, and the last and later being the draw device, responsible for the work processing.
What the vkDevice is opening is a draw device, not a display device. It can work without displaying anything. As you are drawing into a desktop window surface, you do not have to care about the display device because it is owned by the shell’s compositor.
All monitors participating in the desktop screen should be presentable independently of its controlling display device. But It can incur in performance penalties whether copies between the VRAMs are involved in case where the display device presenting your window surface is not the same as the draw device drawing your framebuffer.
Vulkan also provide the VK_KHR_display extension allowing the user to have direct control over monitors. In this case, one would be limited to an specific opened display device.