Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there anyway I can get information about vkimage?

Tags:

vulkan

I have a VkImage, is there any way to get some part of the createInfo which used to create this image? For example, the arrayLayers, mipLevels, extent and format? It seems vkGetImage* does not have this functionality at all?

like image 322
Wang Avatar asked Sep 05 '25 06:09

Wang


1 Answers

Any information you might query about a VkImage is information which, at one point, you must have had because you gave it to Vulkan. Making a Vulkan driver implementation keep track of information you have is a waste of memory and a possible source of driver bugs. Therefore, Vulkan expects that, if you find some information about a VkImage to be important, then you will store that information alongside the image after its creation.

In general, Vulkan has no querying APIs for any information which you yourself provided for any object.

like image 86
Nicol Bolas Avatar answered Sep 07 '25 22:09

Nicol Bolas