From 07d903984055ef1ccc7797a9dcdb66c98c3b3f81 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 16 Nov 2016 14:30:05 +1300 Subject: [PATCH] layers: Only call ValidateLayouts if no prior error The long-term solution here is to merge some of this code together, but validating the layouts later and only if nothing else was bogus is a good start. Signed-off-by: Chris Forbes --- layers/core_validation.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index a1b146b..7177ee0 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -10425,10 +10425,12 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderP std::unique_lock lock(global_lock); - skip_call |= ValidateLayouts(dev_data, device, pCreateInfo); // TODO: As part of wrapping up the mem_tracker/core_validation merge the following routine should be consolidated with // ValidateLayouts. skip_call |= ValidateRenderpassAttachmentUsage(dev_data, pCreateInfo); + if (!skip_call) { + skip_call |= ValidateLayouts(dev_data, device, pCreateInfo); + } lock.unlock(); if (skip_call) { -- 2.7.4