Is there a maximum number of image view you can create? vkCreateImageView is returning ERROR_OUT_OF_DEVICE_MEMORY after 523264 iterations no matter the image format or dimensions and I am sure there are over 10GB device memory still available. I even created my own allocation thru the callback and observed that it takes less than 1kb per allocation. It is not specified as a physical device limit (NVIDIA GeForce GTX 1080 Ti - Vulkan Hardware Database by Sascha Willems) nor can I find any other information regarding it.
I am using Vulkan SDK 1.1.73.0 and GTX 1080Ti latest driver. Appreciate any insights. Tried on sasha’s sample project same error.
Sample code:
VkImageViewCreateInfo createInfo = {};
createInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
createInfo.image = image;
createInfo.viewType = VK_IMAGE_VIEW_TYPE_2D;
createInfo.format = VK_FORMAT_R8G8B8A8_UNORM;
createInfo.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
createInfo.subresourceRange.baseMipLevel = 0;
createInfo.subresourceRange.levelCount = 1;
createInfo.subresourceRange.baseArrayLayer = 0;
createInfo.subresourceRange.layerCount = 1;
for (uint32_t i = 0; i < 600000; i++)
{
result = vkCreateImageView(device, &createInfo, nullptr, &imageView);
VK_CHECK_RESULT(result);
}