SimpleAllocator memAlloc (vk, vkDevice, getPhysicalDeviceMemoryProperties(context.getInstanceInterface(), context.getPhysicalDevice()));
const VkComponentMapping componentMappingRGBA = { VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A };
+ // Check upfront for unsupported features
+ for (size_t attributeNdx = 0; attributeNdx < attributeDescriptions.size(); attributeNdx++)
+ {
+ const VkVertexInputAttributeDescription& attributeDescription = attributeDescriptions[attributeNdx].vkDescription;
+ if (!isSupportedVertexFormat(context, attributeDescription.format))
+ {
+ throw tcu::NotSupportedError(std::string("Unsupported format for vertex input: ") + getFormatName(attributeDescription.format));
+ }
+ }
+
// Create color image
{
const VkImageCreateInfo colorImageParams =
for (size_t attributeNdx = 0; attributeNdx < attributeDescriptions.size(); attributeNdx++)
{
const VkVertexInputAttributeDescription& attributeDescription = attributeDescriptions[attributeNdx].vkDescription;
-
- if (!isSupportedVertexFormat(context, attributeDescription.format))
- throw tcu::NotSupportedError(std::string("Unsupported format for vertex input: ") + getFormatName(attributeDescription.format));
-
vkAttributeDescriptions.push_back(attributeDescription);
}