diff options
| author | Mark Young <marky@lunarg.com> | 2016-05-06 13:48:26 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-05-09 08:29:29 -0600 |
| commit | e3fae4f008ea50c8e293bfa7f56e694fb822146b (patch) | |
| tree | 2f0f8ae6b4b598d354eee9fc56b52b9a4f6043dc /layers | |
| parent | 6b2978d9a6f3f65523dd60fef19771ec584db8de (diff) | |
| download | usermoji-e3fae4f008ea50c8e293bfa7f56e694fb822146b.tar.xz | |
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
Diffstat (limited to 'layers')
| -rw-r--r-- | layers/core_validation.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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, |
