aboutsummaryrefslogtreecommitdiff
path: root/layers/unique_objects.h
diff options
context:
space:
mode:
authorPetr Kraus <petr_kraus@email.cz>2017-12-14 20:57:36 +0100
committerTobin Ehlis <tobine@google.com>2017-12-15 12:35:29 -0700
commit7f36ca0776f1d8d801fc85bb87a23ff440db5dd3 (patch)
tree4a62b28649278ef5024bca7cfd4149fdae247dac /layers/unique_objects.h
parentacfe0d1a7d6dd1bcc7df02f4bb491d42e7abbdde (diff)
downloadusermoji-7f36ca0776f1d8d801fc85bb87a23ff440db5dd3.tar.xz
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)
Diffstat (limited to 'layers/unique_objects.h')
-rw-r--r--layers/unique_objects.h10
1 files changed, 10 insertions, 0 deletions
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 <unordered_map>
+#include <unordered_set>
+
#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<uint64_t, uint64_t> unique_id_mapping; // Map uniqueID to actual object handle
VkPhysicalDevice gpu;
+ struct SubpassesUsageStates {
+ std::unordered_set<uint32_t> subpasses_using_color_attachment;
+ std::unordered_set<uint32_t> subpasses_using_depthstencil_attachment;
+ };
+ // uses unwrapped handles
+ std::unordered_map<VkRenderPass, SubpassesUsageStates> renderpasses_states;
+
layer_data() : wsi_enabled(false), gpu(VK_NULL_HANDLE){};
};