aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 994efb17..950dd760 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -3673,7 +3673,9 @@ void SetLayout(GLOBAL_CB_NODE *pCB, ImageSubresourcePair imgpair, const VkImageL
// TODO (mlentine): Could be expensive and might need to be removed.
assert(imgpair.hasSubresource);
IMAGE_CMD_BUF_LAYOUT_NODE node;
- FindLayout(pCB, imgpair.image, imgpair.subresource, node);
+ if (!FindLayout(pCB, imgpair.image, imgpair.subresource, node)) {
+ node.initialLayout = layout;
+ }
SetLayout(pCB, imgpair, {node.initialLayout, layout});
}
}