diff options
| author | Chris Forbes <chrisforbes@google.com> | 2017-04-26 10:21:20 -0700 |
|---|---|---|
| committer | Chris Forbes <chrisf@ijw.co.nz> | 2017-04-27 05:49:42 +1200 |
| commit | 4013a159700a25f77b04b82bdd40331b42ccd285 (patch) | |
| tree | 1de3264092c2d8c0a513f63bd250bc33b9e107d2 /layers/buffer_validation.cpp | |
| parent | 524d6a4ac0c2ed982242e68240d51dbbbdf42a35 (diff) | |
| download | usermoji-4013a159700a25f77b04b82bdd40331b42ccd285.tar.xz | |
layers: Remove GLOBAL_CB_NODE::imageSubresourceMap
This served no purpose. We can get the same result in the one place that
matters, by consulting GLOBAL_CB_NODE::imageLayoutMap
Diffstat (limited to 'layers/buffer_validation.cpp')
| -rw-r--r-- | layers/buffer_validation.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/layers/buffer_validation.cpp b/layers/buffer_validation.cpp index eefd2ab0..0cd9f36f 100644 --- a/layers/buffer_validation.cpp +++ b/layers/buffer_validation.cpp @@ -32,8 +32,7 @@ #include "buffer_validation.h" void SetLayout(layer_data *device_data, GLOBAL_CB_NODE *pCB, ImageSubresourcePair imgpair, const VkImageLayout &layout) { - if (std::find(pCB->imageSubresourceMap[imgpair.image].begin(), pCB->imageSubresourceMap[imgpair.image].end(), imgpair) != - pCB->imageSubresourceMap[imgpair.image].end()) { + if (pCB->imageLayoutMap.find(imgpair) != pCB->imageLayoutMap.end()) { pCB->imageLayoutMap[imgpair].layout = layout; } else { assert(imgpair.hasSubresource); @@ -222,11 +221,6 @@ void SetGlobalLayout(layer_data *device_data, ImageSubresourcePair imgpair, cons // Set the layout on the cmdbuf level void SetLayout(layer_data *device_data, GLOBAL_CB_NODE *pCB, ImageSubresourcePair imgpair, const IMAGE_CMD_BUF_LAYOUT_NODE &node) { pCB->imageLayoutMap[imgpair] = node; - auto subresource = - std::find(pCB->imageSubresourceMap[imgpair.image].begin(), pCB->imageSubresourceMap[imgpair.image].end(), imgpair); - if (subresource == pCB->imageSubresourceMap[imgpair.image].end()) { - pCB->imageSubresourceMap[imgpair.image].push_back(imgpair); - } } // Set image layout for given VkImageSubresourceRange struct void SetImageLayout(layer_data *device_data, GLOBAL_CB_NODE *cb_node, const IMAGE_STATE *image_state, |
