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)
diff --git a/layers/parameter_validation.h b/layers/parameter_validation.h
index 8acd34b..ced0810 100644
--- a/layers/parameter_validation.h
+++ b/layers/parameter_validation.h
@@ -27,6 +27,7 @@
#include <sstream>
#include <bitset>
#include <mutex>
+#include <unordered_map>
#include <unordered_set>
#include "vulkan/vulkan.h"
@@ -81,6 +82,13 @@
VkDevice device = VK_NULL_HANDLE;
DeviceExtensions extensions;
+ struct SubpassesUsageStates {
+ std::unordered_set<uint32_t> subpasses_using_color_attachment;
+ std::unordered_set<uint32_t> subpasses_using_depthstencil_attachment;
+ };
+
+ std::unordered_map<VkRenderPass, SubpassesUsageStates> renderpasses_states;
+
VkLayerDispatchTable dispatch_table = {};
};