From d5688524bcdd2f7571d22ddb852d04ea4308284c Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 28 Nov 2016 18:07:18 +1300 Subject: layers: Remove extra 'no depth/stencil attachments exist' error This is now covered by other fairly clear errors. Signed-off-by: Chris Forbes --- layers/image.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'layers/image.cpp') diff --git a/layers/image.cpp b/layers/image.cpp index a07e7b3b..ac5284cb 100644 --- a/layers/image.cpp +++ b/layers/image.cpp @@ -405,7 +405,6 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderP const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass) { layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); bool skip_call = false; - bool depth_format_present = false; for (uint32_t i = 0; i < pCreateInfo->attachmentCount; ++i) { if (pCreateInfo->pAttachments[i].format == VK_FORMAT_UNDEFINED) { @@ -439,24 +438,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderP skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, IMAGE_RENDERPASS_INVALID_ATTACHMENT, "IMAGE", "%s", ss.str().c_str()); } - - // Any depth buffers specified as attachments? - depth_format_present |= vk_format_is_depth_or_stencil(pCreateInfo->pAttachments[i].format); } - if (!depth_format_present) { - // No depth attachment is present, validate that subpasses set depthStencilAttachment to VK_ATTACHMENT_UNUSED; - for (uint32_t i = 0; i < pCreateInfo->subpassCount; i++) { - if (pCreateInfo->pSubpasses[i].pDepthStencilAttachment && - pCreateInfo->pSubpasses[i].pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) { - std::stringstream ss; - ss << "vkCreateRenderPass has no depth/stencil attachment, yet subpass[" << i - << "] has VkSubpassDescription::depthStencilAttachment value that is not VK_ATTACHMENT_UNUSED"; - skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, - __LINE__, IMAGE_RENDERPASS_INVALID_DS_ATTACHMENT, "IMAGE", "%s", ss.str().c_str()); - } - } - } if (skip_call) { return VK_ERROR_VALIDATION_FAILED_EXT; } -- cgit v1.2.3