aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2018-05-03 17:10:50 -0700
committerChris Forbes <chrisf@ijw.co.nz>2018-05-08 15:42:02 -0700
commit8773de85fc302d7c33c33b64b399e021e55190ed (patch)
tree0b591f191b607e5785f224b3407f9196f530222a
parentb52a64c9c777429016e8440bfef7515e30c82827 (diff)
downloadusermoji-8773de85fc302d7c33c33b64b399e021e55190ed.tar.xz
layers: Do renderpass dag validation before call
Previously this would contribute to skip /after/ the call, which accomplishes nothing.
-rw-r--r--layers/core_validation.cpp11
1 files 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<bool> has_self_dependency(pCreateInfo->subpassCount);
+ std::vector<DAGNode> subpass_to_node(pCreateInfo->subpassCount);
+ std::vector<int32_t> 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<bool> has_self_dependency(pCreateInfo->subpassCount);
- std::vector<DAGNode> subpass_to_node(pCreateInfo->subpassCount);
- std::vector<int32_t> 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<RENDER_PASS_STATE>(pCreateInfo);
render_pass->renderPass = *pRenderPass;
render_pass->hasSelfDependency = has_self_dependency;