diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-11-03 10:46:44 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-11-04 10:46:16 -0600 |
| commit | 00bea5512da3e1ffa60106800c3009d89ebb5165 (patch) | |
| tree | 46d17853764d460235a0972a834edf1808c63697 | |
| parent | a34c324551b1bd87b2298fd8f4b9554f5943f501 (diff) | |
| download | usermoji-00bea5512da3e1ffa60106800c3009d89ebb5165.tar.xz | |
layers:Handle secondary cmd buffer transitions
When recording a secondary command buffer into a primary command buffer
record any image layout transitions from the secondary cb into the
primary cb.
At QueueSubmit time we validate the layouts at the primary cmd buffer
level so this change will allow that code to correctly work if
layout transitions occur in the secondary command buffer.
| -rw-r--r-- | layers/core_validation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index e0354451..09d41a99 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -11008,6 +11008,10 @@ CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBuffersCount, "supported on this device.", reinterpret_cast<uint64_t>(pCommandBuffers[i])); } + // Propagate layout transitions to the primary cmd buffer + for (auto ilm_entry : pSubCB->imageLayoutMap) { + SetLayout(pCB, ilm_entry.first, ilm_entry.second); + } pSubCB->primaryCommandBuffer = pCB->commandBuffer; pCB->secondaryCommandBuffers.insert(pSubCB->commandBuffer); dev_data->globalInFlightCmdBuffers.insert(pSubCB->commandBuffer); |
