aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-10-26 15:45:33 +1300
committerChris Forbes <chrisforbes@google.com>2016-10-27 12:57:13 +1300
commite11af93696d518b85296977ed6c255861b18ac92 (patch)
tree889937960e3f4a10d302b71f7876c58c7079990a /layers/core_validation.cpp
parent3ee8d523a1c03ff3309b782a58705a6a50f4a869 (diff)
downloadusermoji-e11af93696d518b85296977ed6c255861b18ac92.tar.xz
layers: Don't put self-dep edges in the subpass DAG, or any other junk
We'd already excluded edges to/from VK_SUBPASS_EXTERNAL, but we don't want any of the other weird cases either; if we attempted to trace use of an attachment, and found a subpass which /didn't/ use it, but had a self-dependency, we'd get stuck chasing that dependency recursively until we exhausted the stack. Fixes #1094 Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index b4b080a6..3b3fe52c 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -10033,21 +10033,16 @@ static bool CreatePassDAG(const layer_data *dev_data, VkDevice device, const VkR
log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__,
DRAWSTATE_INVALID_RENDERPASS, "DS", "The src and dest subpasses cannot both be external.");
}
-
- // We don't want to add edges to the DAG for dependencies to/from
- // VK_SUBPASS_EXTERNAL. We don't use them for anything, and their
- // presence complicates other code.
- continue;
} else if (dependency.srcSubpass > dependency.dstSubpass) {
skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__,
DRAWSTATE_INVALID_RENDERPASS, "DS",
"Depedency graph must be specified such that an earlier pass cannot depend on a later pass.");
} else if (dependency.srcSubpass == dependency.dstSubpass) {
has_self_dependency[dependency.srcSubpass] = true;
+ } else {
+ subpass_to_node[dependency.dstSubpass].prev.push_back(dependency.srcSubpass);
+ subpass_to_node[dependency.srcSubpass].next.push_back(dependency.dstSubpass);
}
-
- subpass_to_node[dependency.dstSubpass].prev.push_back(dependency.srcSubpass);
- subpass_to_node[dependency.srcSubpass].next.push_back(dependency.dstSubpass);
}
return skip_call;
}