From 8773de85fc302d7c33c33b64b399e021e55190ed Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 3 May 2018 17:10:50 -0700 Subject: layers: Do renderpass dag validation before call Previously this would contribute to skip /after/ the call, which accomplishes nothing. --- layers/core_validation.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 755699bd..444f5e0d 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -9135,6 +9135,12 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderP // TODO: As part of wrapping up the mem_tracker/core_validation merge the following routine should be consolidated with // ValidateLayouts. skip |= ValidateRenderpassAttachmentUsage(dev_data, pCreateInfo); + + std::vector has_self_dependency(pCreateInfo->subpassCount); + std::vector subpass_to_node(pCreateInfo->subpassCount); + std::vector subpass_to_dep_index(pCreateInfo->subpassCount); + skip |= CreatePassDAG(dev_data, pCreateInfo, subpass_to_node, has_self_dependency, subpass_to_dep_index); + for (uint32_t i = 0; i < pCreateInfo->dependencyCount; ++i) { auto const &dependency = pCreateInfo->pDependencies[i]; skip |= ValidateStageMaskGsTsEnables(dev_data, dependency.srcStageMask, "vkCreateRenderPass()", VALIDATION_ERROR_13e006b8, @@ -9170,11 +9176,6 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderP if (VK_SUCCESS == result) { lock.lock(); - std::vector has_self_dependency(pCreateInfo->subpassCount); - std::vector subpass_to_node(pCreateInfo->subpassCount); - std::vector subpass_to_dep_index(pCreateInfo->subpassCount); - skip |= CreatePassDAG(dev_data, pCreateInfo, subpass_to_node, has_self_dependency, subpass_to_dep_index); - auto render_pass = std::make_shared(pCreateInfo); render_pass->renderPass = *pRenderPass; render_pass->hasSelfDependency = has_self_dependency; -- cgit v1.2.3