Image view limits?

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 (https://vulkan.gpuinfo.org/displayreport.php?id=3598#limits) 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);
}

Is this out of pure curiosity? because i can’t figure why you would need 600000 image views.

I’m working on a large city research project that require rendering over 5 million individual textures in real time. Ideally I want my algorithm to be robust to accommodate raw input data without preprocessing (e.g. texture atlases) and it also can be a good comparison case to other methods. Let me know if you also see this error using AMD’s GPU as I don’t have one to test.

You asked before: https://forums.khronos.org/showthread.php/13713-out-of-device-memory-error-(but-plenty-of-device-memory-left)

I don’t get such error on AMD with up to 100 000 000 vkCreateImageViews. Doesn’t mean it does not bite me somewhere down the road (which I have not tested).

Ok thanks for the info. I tested on another GTX 1070 and it fails at the same limit. I think this is the device/driver set limit.