aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2018-03-12 11:26:39 -0600
committerTobin Ehlis <tobine@google.com>2018-03-16 08:24:50 -0600
commit00e4c054c2db54f3976689cad0588e5d15f06ac1 (patch)
treee19f5c80eedbe904c0fa2af3802ad6731dbc7671 /layers/core_validation.cpp
parent87481b72cb058ef12acf4bcfc982fea5c486248e (diff)
downloadusermoji-00e4c054c2db54f3976689cad0588e5d15f06ac1.tar.xz
layers:Check secondary command buffer renderArea
Fixes #2480 Fixes #1501 Add delayed function call to verify secondary command buffer renderArea against vkCmdClearAttachments() rects at vkCmdExecuteCommands() time. Updated the lambda function container for delayed secondary command buffer checks to include a reference to the primary command buffer. Add lambda call at vkCmdClearAttachments() for secondary command buffer and pass in primary command buffer reference so that area restriction can be appropriately checked at vkCmdExecuteCommands() time when renderArea of renderPass is known.
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 4ecb82ee..e0c4789b 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -7374,7 +7374,7 @@ static bool ValidateRenderPassImageBarriers(layer_data *device_data, const char
if (VK_NULL_HANDLE == cb_state->activeFramebuffer) {
assert(VK_COMMAND_BUFFER_LEVEL_SECONDARY == cb_state->createInfo.level);
// Secondary CB case w/o FB specified delay validation
- cb_state->cmd_execute_commands_functions.emplace_back([=](VkFramebuffer fb) {
+ cb_state->cmd_execute_commands_functions.emplace_back([=](GLOBAL_CB_NODE *primary_cb, VkFramebuffer fb) {
return ValidateImageBarrierImage(device_data, funcName, cb_state, fb, active_subpass, sub_desc, rp_handle, i,
img_barrier);
});
@@ -9437,10 +9437,10 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands(VkCommandBuffer commandBuffer, uin
// If framebuffer for secondary CB is not NULL, then it must match active FB from primaryCB
skip |=
validateFramebuffer(dev_data, commandBuffer, pCB, pCommandBuffers[i], pSubCB, "vkCmdExecuteCommands()");
- if (VK_NULL_HANDLE == pSubCB->activeFramebuffer) {
+ if (!pSubCB->cmd_execute_commands_functions.empty()) {
// Inherit primary's activeFramebuffer and while running validate functions
for (auto &function : pSubCB->cmd_execute_commands_functions) {
- skip |= function(pCB->activeFramebuffer);
+ skip |= function(pCB, pCB->activeFramebuffer);
}
}
}