user369070
user369070

Reputation: 635

Using different VkDevice for image and its view

It would appear that it is possible to create VkImage and VkImageView with different VkDevice (I couldn't find spec saying otherwise). What is the relation of VkDevice to these objects in this case? Does it make possible to read/write data from one device to other with a shader? vkCmdBindDescriptorSets() says Each of commandBuffer, layout, and the elements of pDescriptorSets must have been created, allocated, or retrieved from the same VkDevice, but does it mean VkDescriptorSet themselves, or the resources which they bind?

Besides that, it seems possible to vkUpdateDescriptorSets() with a different device than from which the descriptor sets were allocated. In this case I don't see how choosing a device affects anything.

Upvotes: 1

Views: 162

Answers (1)

krOoze
krOoze

Reputation: 13286

No, you cannot mix objects. At best you can import\export stuff with VK_KHR_external_memory_*.

vkUpdateDescriptorSets() common parent VU is just messy because it is generated by an imperfect script.

Upvotes: 1

Related Questions