From e3fae4f008ea50c8e293bfa7f56e694fb822146b Mon Sep 17 00:00:00 2001 From: Mark Young Date: Fri, 6 May 2016 13:48:26 -0600 Subject: layers: Properly set secondary cmd buffer inherited items. We failed to inherit the proper items in the secondary cmd buffer in the core_validation layer when the VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT bit was set. Change-Id: I01579d889dde8e0d331ed5a65eb48ce7185d3d82 --- layers/core_validation.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 19cb0a30..22573b44 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -6152,6 +6152,13 @@ vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginIn if (pCB->beginInfo.pInheritanceInfo) { pCB->inheritanceInfo = *(pCB->beginInfo.pInheritanceInfo); pCB->beginInfo.pInheritanceInfo = &pCB->inheritanceInfo; + // If we are a secondary command-buffer and inheriting. Update the items we should inherit. + if ((pCB->createInfo.level != VK_COMMAND_BUFFER_LEVEL_PRIMARY) && + (pCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT)) { + pCB->activeRenderPass = pCB->beginInfo.pInheritanceInfo->renderPass; + pCB->activeSubpass = pCB->beginInfo.pInheritanceInfo->subpass; + pCB->framebuffers.insert(pCB->beginInfo.pInheritanceInfo->framebuffer); + } } } else { skipCall |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, -- cgit v1.2.3