layers:Set framebuffer for secondary cmd buffer
authorTobin Ehlis <tobine@google.com>
Thu, 3 Nov 2016 13:26:28 +0000 (07:26 -0600)
committerTobin Ehlis <tobine@google.com>
Fri, 4 Nov 2016 16:46:16 +0000 (10:46 -0600)
If a secondary cmd buffer is inheriting state, need to update the
activeFramebuffer in same way we update active renderPass and subpass.

layers/core_validation.cpp

index 06f8aa2..e035445 100644 (file)
@@ -7349,6 +7349,7 @@ BeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo
                 (cb_node->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT)) {
                 cb_node->activeRenderPass = getRenderPassState(dev_data, cb_node->beginInfo.pInheritanceInfo->renderPass);
                 cb_node->activeSubpass = cb_node->beginInfo.pInheritanceInfo->subpass;
+                cb_node->activeFramebuffer = cb_node->beginInfo.pInheritanceInfo->framebuffer;
                 cb_node->framebuffers.insert(cb_node->beginInfo.pInheritanceInfo->framebuffer);
             }
         }