From ae8d3b1c5982f64b581ab3489680ee247af4f1b3 Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Wed, 11 Jan 2017 11:36:16 -0700 Subject: layers: Move CreateImage recording to buf/img module - Move source from core_validation.cpp into new module - Add new module to layers cmake file - Update android build scripts/makefiles for new files Change-Id: Ia4000b26384d96a551d727f5e37997372f01764a --- layers/buffer_validation.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'layers/buffer_validation.cpp') diff --git a/layers/buffer_validation.cpp b/layers/buffer_validation.cpp index 4bcbf13a..0f47b301 100644 --- a/layers/buffer_validation.cpp +++ b/layers/buffer_validation.cpp @@ -22,3 +22,16 @@ #define NOMINMAX #include "buffer_validation.h" + +VK_LAYER_EXPORT void PostCallRecordCreateImage(std::unordered_map> &imageMap, + std::unordered_map> &imageSubresourceMap, + std::unordered_map &imageLayoutMap, + const VkImageCreateInfo *pCreateInfo, VkImage *pImage) { + IMAGE_LAYOUT_NODE image_state; + image_state.layout = pCreateInfo->initialLayout; + image_state.format = pCreateInfo->format; + imageMap.insert(std::make_pair(*pImage, std::unique_ptr(new IMAGE_STATE(*pImage, pCreateInfo)))); + ImageSubresourcePair subpair{*pImage, false, VkImageSubresource()}; + imageSubresourceMap[*pImage].push_back(subpair); + imageLayoutMap[subpair] = image_state; +} -- cgit v1.2.3