From fb9bf1809168d55d88f5f3a0dda6659c73b83ab5 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 5 Oct 2016 11:33:23 +1300 Subject: layers: Unify two generic object structs Signed-off-by: Chris Forbes --- layers/core_validation_types.h | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/layers/core_validation_types.h b/layers/core_validation_types.h index 8fef5c54..69012afb 100644 --- a/layers/core_validation_types.h +++ b/layers/core_validation_types.h @@ -195,21 +195,6 @@ class IMAGE_VIEW_STATE : public BASE_NODE { IMAGE_VIEW_STATE(const IMAGE_VIEW_STATE &rh_obj) = delete; }; -// Simple struct to hold handle and type of object so they can be uniquely identified and looked up in appropriate map -// TODO : Unify this with VK_OBJECT above -struct MT_OBJ_HANDLE_TYPE { - uint64_t handle; - VkDebugReportObjectTypeEXT type; -}; - -inline bool operator==(MT_OBJ_HANDLE_TYPE a, MT_OBJ_HANDLE_TYPE b) NOEXCEPT { return a.handle == b.handle && a.type == b.type; } - -namespace std { -template <> struct hash { - size_t operator()(MT_OBJ_HANDLE_TYPE obj) const NOEXCEPT { return hash()(obj.handle) ^ hash()(obj.type); } -}; -} - struct MemRange { VkDeviceSize offset; VkDeviceSize size; @@ -234,7 +219,7 @@ struct DEVICE_MEM_INFO : public BASE_NODE { bool global_valid; // If allocation is mapped, set to "true" to be picked up by subsequently bound ranges VkDeviceMemory mem; VkMemoryAllocateInfo alloc_info; - std::unordered_set obj_bindings; // objects bound to this memory + std::unordered_set obj_bindings; // objects bound to this memory std::unordered_set command_buffer_bindings; // cmd buffers referencing this memory std::unordered_map bound_ranges; // Map of object to its binding range // Convenience vectors image/buff handles to speed up iterating over images or buffers independently -- cgit v1.2.3