Can I change the physical device on the run time?

Hello, I have interesting questions

For example, I have two NVIDIA 4060 ti cards (same model)

After creating the instance, the MS Window HWND and its Vulkan surface,
I can have the list of physical devices on my computer

Using one of the physical devices, I will do remaing coding and the program begins to run

When running the program, by the menu I already made, I will choose different physical device

Then the program window will move and appear to that new physical device (another monitor screen)

Of course, I need to do coding for this job

I have three questions below

Is this usual, valid and recommendable without causing any issue ?

Can I just replace the physical device without recreating all of them again (queues, swapchain, renderpass etc) ?
So, I want to minimize necessary objects recreation

  1. Can Vulkan detect whether or not any monitor is connected to a VGA card (among several) ?

Thank you in advance

No. If the two physical devices are compatible (like SLI-style connected), you may be able to port memory objects from one to the other. But for the most part, no.

Can Vulkan detect whether or not any monitor is connected to a VGA card (among several) ?

What is a “VGA card”. In any cases, connections between physical devices and displays are platform-specific. You have to use the platform-specific Vulkan interfaces to ask those questions.

1 Like

Hello, thank you for your help
Have a nice weekend, Alfonse