if (!aspectFlags)
aspectFlags = VK_IMAGE_ASPECT_COLOR_BIT;
+ VkFormatProperties formatProperties;
+ m_context.getInstanceInterface().getPhysicalDeviceFormatProperties(m_context.getPhysicalDevice(),
+ it->format, &formatProperties);
+
+ if ((formatProperties.optimalTilingFeatures & (VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT |
+ VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT)) == 0)
+ throw tcu::NotSupportedError("Format not supported as attachment");
+
const VkImageViewCreateInfo createInfo =
{
VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, // VkStructureType sType;