layers: MR145/GL67, Correctly mirror command buffer inheritance info
Embedded InheritanceInfo struct within command buffer BeginInfo was not correctly
mirrored in draw_state. Correctly copy this data as appropriate and correctly
clear it when command buffer is reset.
Conflicts:
layers/draw_state.cpp
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index 62a3477..fd975ee 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -2566,6 +2566,7 @@
// Reset CB state (note that createInfo is not cleared)
pCB->commandBuffer = cb;
memset(&pCB->beginInfo, 0, sizeof(VkCommandBufferBeginInfo));
+ memset(&pCB->inheritanceInfo, 0, sizeof(VkCommandBufferInheritanceInfo));
pCB->fence = 0;
pCB->numCmds = 0;
memset(pCB->drawCount, 0, NUM_DRAW_TYPES * sizeof(uint64_t));
@@ -4037,6 +4038,11 @@
// Set updated state here in case implicit reset occurs above
pCB->state = CB_RECORDING;
pCB->beginInfo = *pBeginInfo;
+
+ if (pCB->beginInfo.pInheritanceInfo) {
+ pCB->inheritanceInfo = *(pCB->beginInfo.pInheritanceInfo);
+ pCB->beginInfo.pInheritanceInfo = &pCB->inheritanceInfo;
+ }
} else {
skipCall |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, (uint64_t)commandBuffer, __LINE__, DRAWSTATE_INVALID_COMMAND_BUFFER, "DS",
"In vkBeginCommandBuffer() and unable to find CommandBuffer Node for CB %p!", (void*)commandBuffer);