From 1d105c6f432d831230f364e728dea489281bac09 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 1 Jul 2016 18:27:30 +1200 Subject: Tweaks for review feedback Signed-off-by: Chris Forbes --- layers/core_validation.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index a71c5bfc..03d48501 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -8926,19 +8926,18 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend if (!skip_call && attachment != VK_ATTACHMENT_UNUSED) { sample_count |= (unsigned)pCreateInfo->pAttachments[attachment].samples; - } - if (!skip_call && - subpass_performs_resolve && - attachment != VK_ATTACHMENT_UNUSED && - pCreateInfo->pAttachments[attachment].samples == VK_SAMPLE_COUNT_1_BIT) { - skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VkDebugReportObjectTypeEXT(0), 0, - __LINE__, DRAWSTATE_INVALID_RENDERPASS, "DS", - "CreateRenderPass: Subpass %u requests multisample resolve, but renders to " - "attachment %u which has VK_SAMPLE_COUNT_1_BIT", - i, attachment); + if (subpass_performs_resolve && + pCreateInfo->pAttachments[attachment].samples == VK_SAMPLE_COUNT_1_BIT) { + skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VkDebugReportObjectTypeEXT(0), 0, + __LINE__, DRAWSTATE_INVALID_RENDERPASS, "DS", + "CreateRenderPass: Subpass %u requests multisample resolve from attachment %u " + "which has VK_SAMPLE_COUNT_1_BIT", + i, attachment); + } } } + if (subpass.pDepthStencilAttachment && subpass.pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) { uint32_t attachment = subpass.pDepthStencilAttachment->attachment; skip_call |= ValidateAttachmentIndex(dev_data, attachment, pCreateInfo->attachmentCount, "Depth stencil"); @@ -8947,6 +8946,7 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend sample_count |= (unsigned)pCreateInfo->pAttachments[attachment].samples; } } + for (uint32_t j = 0; j < subpass.inputAttachmentCount; ++j) { uint32_t attachment = subpass.pInputAttachments[j].attachment; skip_call |= ValidateAttachmentIndex(dev_data, attachment, pCreateInfo->attachmentCount, "Input"); -- cgit v1.2.3