From 33dc2b9e2c0b56dd81868eb66a29e959c15caf5b Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Fri, 27 Jan 2017 14:50:23 -0700 Subject: layers: Move CreateRenderPass format check to PV Format validation check was in image layer -- removed the API completely and moved check to parameter_validation. Also updated to use the VU ID and noted it in the database. Change-Id: I339925be7615777cfb1214ffe456a2498c676177 --- layers/parameter_validation.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'layers/parameter_validation.cpp') diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp index 6ee96657..8b12c341 100644 --- a/layers/parameter_validation.cpp +++ b/layers/parameter_validation.cpp @@ -3754,6 +3754,16 @@ static bool PreCreateRenderPass(layer_data *dev_data, const VkRenderPassCreateIn bool skip = false; uint32_t max_color_attachments = dev_data->device_limits.maxColorAttachments; + for (uint32_t i = 0; i < pCreateInfo->attachmentCount; ++i) { + if (pCreateInfo->pAttachments[i].format == VK_FORMAT_UNDEFINED) { + std::stringstream ss; + ss << "vkCreateRenderPass: pCreateInfo->pAttachments[" << i << "].format is VK_FORMAT_UNDEFINED. " + << validation_error_map[VALIDATION_ERROR_00336]; + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, + VALIDATION_ERROR_00336, "IMAGE", "%s", ss.str().c_str()); + } + } + for (uint32_t i = 0; i < pCreateInfo->subpassCount; ++i) { if (pCreateInfo->pSubpasses[i].colorAttachmentCount > max_color_attachments) { skip |= -- cgit v1.2.3