diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-03-28 14:34:40 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-03-29 15:27:59 -0600 |
| commit | 03dc6579a55465c9ac5b3464ef4ab0630649c5b3 (patch) | |
| tree | 6426fee84b0703ec48ea130b9f1348026c6c80b7 /layers/core_validation.cpp | |
| parent | 3ed761225a52f88106badb61c6cbb2481882121f (diff) | |
| download | usermoji-03dc6579a55465c9ac5b3464ef4ab0630649c5b3.tar.xz | |
layers: Michael's fix for uninit'd data in FindLayout
Change-Id: Ia34d036e15a08c135cf3fb0ea4a80c12f2201ec7
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 4 |
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}); } } |
