From 9efb8af92de180ea85ee8062ddcd4aee00dbd2c0 Mon Sep 17 00:00:00 2001 From: Petr Kraus Date: Sun, 10 Sep 2017 02:26:33 +0200 Subject: layers: Fix Graphics Pipeline pointers not ignored Some VkGraphicsPipelineCreateInfo pointers must be ignored under some conditions, but were not in the layers. Add relevant tests. Fix tests found broken (using depth or color without attachment in subpass) Change-Id: I3e2a3f61a52c72ce3a11483ff8b031189f4c61c9 --- layers/unique_objects.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'layers/unique_objects.h') diff --git a/layers/unique_objects.h b/layers/unique_objects.h index 57b9dbf3..e604e915 100644 --- a/layers/unique_objects.h +++ b/layers/unique_objects.h @@ -21,6 +21,9 @@ #include "vulkan/vulkan.h" +#include +#include + #include "vk_layer_data.h" #include "vk_safe_struct.h" #include "vk_layer_utils.h" @@ -69,6 +72,13 @@ struct layer_data { std::unordered_map unique_id_mapping; // Map uniqueID to actual object handle VkPhysicalDevice gpu; + struct SubpassesUsageStates { + std::unordered_set subpasses_using_color_attachment; + std::unordered_set subpasses_using_depthstencil_attachment; + }; + // uses unwrapped handles + std::unordered_map renderpasses_states; + layer_data() : wsi_enabled(false), gpu(VK_NULL_HANDLE){}; }; -- cgit v1.2.3