diff options
| author | Michael Lentine <mlentine@google.com> | 2016-01-19 14:00:53 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-01-22 14:06:41 -0700 |
| commit | 192023082850653dc7bf08d3735fcb6f9fd41319 (patch) | |
| tree | c22369519c71e01f1fcbebfc598c4e1319e950fa /layers/draw_state.cpp | |
| parent | e22b00057b9d0de018e364c12707ce77abed6b86 (diff) | |
| download | usermoji-192023082850653dc7bf08d3735fcb6f9fd41319.tar.xz | |
layers: MR150, Fix render pass graphics checks
Make sure that VK_SUBPASS_EXTERNAL is handled properly.
Diffstat (limited to 'layers/draw_state.cpp')
| -rw-r--r-- | layers/draw_state.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index f8c72088..7a513d2c 100644 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -5077,7 +5077,9 @@ VkBool32 ValidateMaskBits(const layer_data* my_data, VkCommandBuffer cmdBuffer, } else { std::string opt_bits; if (optional_bits != 0) { - opt_bits = "and may have optional bits " + std::to_string(optional_bits) + ' ' + string_VkAccessFlags(optional_bits); + std::stringstream ss; + ss << optional_bits; + opt_bits = "and may have optional bits " + ss.str() + ' ' + string_VkAccessFlags(optional_bits); } skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_WARN_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, DRAWSTATE_INVALID_BARRIER, "DS", "%s AccessMask %d %s must have required access bit %d %s %s when layout is %s, unless the app has previously added a barrier for this transition.", @@ -5528,14 +5530,21 @@ VkBool32 CreatePassDAG(const layer_data* my_data, VkDevice device, const VkRende } for (uint32_t i = 0; i < pCreateInfo->dependencyCount; ++i) { const VkSubpassDependency& dependency = pCreateInfo->pDependencies[i]; - if (dependency.srcSubpass > dependency.dstSubpass) { + if (dependency.srcSubpass > dependency.dstSubpass && dependency.srcSubpass != VK_SUBPASS_EXTERNAL && dependency.dstSubpass != VK_SUBPASS_EXTERNAL) { skip_call |= log_msg(my_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 == VK_SUBPASS_EXTERNAL && dependency.dstSubpass == VK_SUBPASS_EXTERNAL) { + skip_call |= log_msg(my_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."); } else if (dependency.srcSubpass == dependency.dstSubpass) { has_self_dependency[dependency.srcSubpass] = true; } - subpass_to_node[dependency.dstSubpass].prev.push_back(dependency.srcSubpass); - subpass_to_node[dependency.srcSubpass].next.push_back(dependency.dstSubpass); + if (dependency.dstSubpass != VK_SUBPASS_EXTERNAL) { + subpass_to_node[dependency.dstSubpass].prev.push_back(dependency.srcSubpass); + } + if (dependency.srcSubpass != VK_SUBPASS_EXTERNAL) { + subpass_to_node[dependency.srcSubpass].next.push_back(dependency.dstSubpass); + } } return skip_call; } |
