diff options
| author | Chris Forbes <chrisforbes@google.com> | 2016-10-12 08:55:03 +1300 |
|---|---|---|
| committer | Chris Forbes <chrisforbes@google.com> | 2016-11-22 11:45:12 +1300 |
| commit | 2db86874983548c5ecda41c79d9fda27b66d2d17 (patch) | |
| tree | c54feb5b3b51ca8c458d8ffe2a44dd43cb09d4fa /layers/core_validation.h | |
| parent | c82a17124103cfe9ba1cf3c4a9f1c78b5e9bcf54 (diff) | |
| download | usermoji-2db86874983548c5ecda41c79d9fda27b66d2d17.tar.xz | |
layers: Track surface support for gpu+queue
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/core_validation.h')
| -rw-r--r-- | layers/core_validation.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/layers/core_validation.h b/layers/core_validation.h index 58383eaf..ac431385 100644 --- a/layers/core_validation.h +++ b/layers/core_validation.h @@ -223,10 +223,28 @@ struct PHYSICAL_DEVICE_STATE { VkSurfaceCapabilitiesKHR surfaceCapabilities = {}; }; +struct GpuQueue { + VkPhysicalDevice gpu; + uint32_t queue_family_index; +}; + +inline bool operator==(GpuQueue const & lhs, GpuQueue const & rhs) { + return (lhs.gpu == rhs.gpu && lhs.queue_family_index == rhs.queue_family_index); +} + +namespace std { +template <> struct hash<GpuQueue> { + size_t operator()(GpuQueue gq) const throw() { + return hash<uint64_t>()((uint64_t)(gq.gpu)) ^ hash<uint32_t>()(gq.queue_family_index); + } +}; +} + struct SURFACE_STATE { VkSurfaceKHR surface = VK_NULL_HANDLE; SWAPCHAIN_NODE *swapchain = nullptr; SWAPCHAIN_NODE *old_swapchain = nullptr; + std::unordered_map<GpuQueue, bool> gpu_queue_support; SURFACE_STATE() {} SURFACE_STATE(VkSurfaceKHR surface) |
