layers: Only call ValidateLayouts if no prior error
authorChris Forbes <chrisforbes@google.com>
Wed, 16 Nov 2016 01:30:05 +0000 (14:30 +1300)
committerChris Forbes <chrisforbes@google.com>
Sun, 20 Nov 2016 22:07:36 +0000 (11:07 +1300)
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 <chrisforbes@google.com>
layers/core_validation.cpp

index a1b146b..7177ee0 100644 (file)
@@ -10425,10 +10425,12 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderP
 
     std::unique_lock<std::mutex> 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) {