caxieyou110
caxieyou110

Reputation: 557

what is the relationship between vulkan physical device and instance?

I am currently a little confused about the Vulkan instance and physical devices relationship.

So assume I have one PC with two graphics card, one is NVidia and the other is AMD,

I use the API to check the instance properties and extensions, then I create an instance with two cards' extension or propeties, which means when I check how many physical devices is available, it should return 2.

Then I just create some logical device with each card. So far so good. What if I create another instance, can I still do the same thing?

Can I still get 2 available physical cards or 0 after I already create some logical device to each card?

If I get 2, can I still create more logical devices?

The following link is the picture from the Vulkan book, which indicates that I can create more then one instance, but I just don't know, how the physical devices works. https://pic1.xuehuaimg.com/proxy/csdn/https://img-blog.csdn.net/20170505223921807?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcXFfMzY1ODQwNjM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast

Upvotes: 0

Views: 759

Answers (1)

krOoze
krOoze

Reputation: 13306

You can create arbitrary amount of instances. Instances are isolated from each other. Same as if any other app also uses Vulkan. Your physical devices won't disappear or anything.

Similarly, you can have any number of logical devices.

Upvotes: 1

Related Questions