c++graphicsvulkanvalidation-layers

Vulkan image incompatibility, is there a nice way to check which parameters are incompatible?


My validation errors are returning the following error:

Message ID name: VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251
Message: Validation Error: [ VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251 ] Object 0: handle = 0x1867f53a780, name = Logical device: NVIDIA GeForce GTX 1070, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbebcae79 | vkCreateImage(): Format VK_FORMAT_R8G8B8A8_SRGB is not supported for this combination of parameters and VkGetPhysicalDeviceImageFormatProperties returned back VK_ERROR_FORMAT_NOT_SUPPORTED. The Vulkan spec states: Each of the following values (as described in Image Creation Limits) must not be undefined : imageCreateMaxMipLevels, imageCreateMaxArrayLayers, imageCreateMaxExtent, and imageCreateSampleCounts (https://vulkan.lunarg.com/doc/view/1.2.198.1/windows/1.2-extensions/vkspec.html#VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251)
Severity: VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT

I know exactly the place in the code that's causing this, however I don't know which combination of parameters is at fault. Is there a way to get the driver to indicate:

"Your image is format x which is incompatible with usage type y" or something like that?


Solution

  • If some parameters are clashing, then ask https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues for improved error reporting. There should ideally be appropriate error message.

    But if the GPU simply does not support given combination of parameters, then there is nothing that can be done. It is meaningles to ask "why don't you support X". They simply don't, because it is not implemented or not implementable on given GPU\driver.