aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-05-11 10:38:29 -0600
committerKarl Schultz <karl@lunarg.com>2016-05-13 12:23:41 -0600
commit8b01247dcb8ca42733f1d0e300e32210e3d9116d (patch)
treef68089c606b7f0b28e1d4112e555d0635a2240b0
parent6dfbf31cb2af1e3281300b50e69d12379a17b039 (diff)
downloadusermoji-8b01247dcb8ca42733f1d0e300e32210e3d9116d.tar.xz
layers: Migrate INVALID_IMAGE_LAYOUT check to renderpass create time
Previously performing this check at CmdBeginRenderPass time, but we have all of the data needed when renderpass is created so check there instead.
-rw-r--r--layers/core_validation.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index ce404d22..6a3deb7b 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -8416,6 +8416,7 @@ static bool ValidateLayouts(const layer_data *my_data, VkDevice device, const Vk
for (uint32_t i = 0; i < pCreateInfo->subpassCount; ++i) {
const VkSubpassDescription &subpass = pCreateInfo->pSubpasses[i];
for (uint32_t j = 0; j < subpass.inputAttachmentCount; ++j) {
+ const VkAttachmentDescription attach_desc = pCreateInfo->pAttachments[subpass.pInputAttachments[j].attachment];
if (subpass.pInputAttachments[j].layout != VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL &&
subpass.pInputAttachments[j].layout != VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) {
if (subpass.pInputAttachments[j].layout == VK_IMAGE_LAYOUT_GENERAL) {