Mark Lobodzinski | 6eda00a | 2016-02-02 15:55:36 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2015-2016 The Khronos Group Inc. |
| 2 | * Copyright (c) 2015-2016 Valve Corporation |
| 3 | * Copyright (c) 2015-2016 LunarG, Inc. |
Ian Elliott | 8f78daa | 2016-01-26 10:51:10 -0700 | [diff] [blame] | 4 | * Copyright (C) 2015-2016 Google Inc. |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 5 | * |
Jon Ashburn | 3ebf125 | 2016-04-19 11:30:31 -0600 | [diff] [blame] | 6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | * you may not use this file except in compliance with the License. |
| 8 | * You may obtain a copy of the License at |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 9 | * |
Jon Ashburn | 3ebf125 | 2016-04-19 11:30:31 -0600 | [diff] [blame] | 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 11 | * |
Jon Ashburn | 3ebf125 | 2016-04-19 11:30:31 -0600 | [diff] [blame] | 12 | * Unless required by applicable law or agreed to in writing, software |
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | * See the License for the specific language governing permissions and |
| 16 | * limitations under the License. |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 17 | * |
Courtney Goeltzenleuchter | 0555952 | 2015-10-30 11:14:30 -0600 | [diff] [blame] | 18 | * Author: Ian Elliott <ian@lunarg.com> |
Ian Elliott | 578e7e2 | 2016-01-05 14:03:16 -0700 | [diff] [blame] | 19 | * Author: Ian Elliott <ianelliott@google.com> |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 20 | */ |
| 21 | |
| 22 | #ifndef SWAPCHAIN_H |
| 23 | #define SWAPCHAIN_H |
| 24 | |
David Pinedo | 9316d3b | 2015-11-06 12:54:48 -0700 | [diff] [blame] | 25 | #include "vulkan/vk_layer.h" |
Tobin Ehlis | 711ff31 | 2015-10-29 12:58:13 -0600 | [diff] [blame] | 26 | #include "vk_layer_config.h" |
| 27 | #include "vk_layer_logging.h" |
Courtney Goeltzenleuchter | cf60e0a | 2015-10-08 17:07:25 -0600 | [diff] [blame] | 28 | #include <vector> |
Tobin Ehlis | 711ff31 | 2015-10-29 12:58:13 -0600 | [diff] [blame] | 29 | #include <unordered_map> |
Courtney Goeltzenleuchter | cf60e0a | 2015-10-08 17:07:25 -0600 | [diff] [blame] | 30 | |
Ian Elliott | b0f474c | 2015-09-25 15:50:55 -0600 | [diff] [blame] | 31 | // Swapchain ERROR codes |
Mark Lobodzinski | 3ae5516 | 2016-05-19 17:01:48 -0600 | [diff] [blame] | 32 | enum SWAPCHAIN_ERROR { |
Jon Ashburn | 5484e0c | 2016-03-08 17:48:44 -0700 | [diff] [blame] | 33 | SWAPCHAIN_INVALID_HANDLE, // Handle used that isn't currently valid |
| 34 | SWAPCHAIN_NULL_POINTER, // Pointer set to NULL, instead of being a valid pointer |
| 35 | SWAPCHAIN_EXT_NOT_ENABLED_BUT_USED, // Did not enable WSI extension, but called WSI function |
| 36 | SWAPCHAIN_DEL_OBJECT_BEFORE_CHILDREN, // Called vkDestroyDevice() before vkDestroySwapchainKHR() |
| 37 | SWAPCHAIN_CREATE_UNSUPPORTED_SURFACE, // Called vkCreateSwapchainKHR() with a pCreateInfo->surface that wasn't seen as supported |
| 38 | // by vkGetPhysicalDeviceSurfaceSupportKHR for the device |
| 39 | SWAPCHAIN_CREATE_SWAP_WITHOUT_QUERY, // Called vkCreateSwapchainKHR() without calling a query (e.g. |
| 40 | // vkGetPhysicalDeviceSurfaceCapabilitiesKHR()) |
Jon Ashburn | 5484e0c | 2016-03-08 17:48:44 -0700 | [diff] [blame] | 41 | SWAPCHAIN_CREATE_SWAP_OUT_OF_BOUNDS_EXTENTS, // Called vkCreateSwapchainKHR() with out-of-bounds imageExtent |
Mark Lobodzinski | 1ed594e | 2016-02-03 09:57:14 -0700 | [diff] [blame] | 42 | SWAPCHAIN_CREATE_SWAP_EXTENTS_NO_MATCH_WIN, // Called vkCreateSwapchainKHR() with imageExtent that doesn't match window's extent |
| 43 | SWAPCHAIN_CREATE_SWAP_BAD_PRE_TRANSFORM, // Called vkCreateSwapchainKHR() with a non-supported preTransform |
| 44 | SWAPCHAIN_CREATE_SWAP_BAD_COMPOSITE_ALPHA, // Called vkCreateSwapchainKHR() with a non-supported compositeAlpha |
David McFarland | e22cfb0 | 2016-05-20 18:26:28 -0300 | [diff] [blame] | 45 | SWAPCHAIN_CREATE_SWAP_BAD_IMG_ARRAY_LAYERS, // Called vkCreateSwapchainKHR() with a non-supported imageArrayLayers |
Mark Lobodzinski | 1ed594e | 2016-02-03 09:57:14 -0700 | [diff] [blame] | 46 | SWAPCHAIN_CREATE_SWAP_BAD_IMG_USAGE_FLAGS, // Called vkCreateSwapchainKHR() with a non-supported imageUsageFlags |
| 47 | SWAPCHAIN_CREATE_SWAP_BAD_IMG_COLOR_SPACE, // Called vkCreateSwapchainKHR() with a non-supported imageColorSpace |
| 48 | SWAPCHAIN_CREATE_SWAP_BAD_IMG_FORMAT, // Called vkCreateSwapchainKHR() with a non-supported imageFormat |
| 49 | SWAPCHAIN_CREATE_SWAP_BAD_IMG_FMT_CLR_SP, // Called vkCreateSwapchainKHR() with a non-supported imageColorSpace |
| 50 | SWAPCHAIN_CREATE_SWAP_BAD_PRESENT_MODE, // Called vkCreateSwapchainKHR() with a non-supported presentMode |
| 51 | SWAPCHAIN_CREATE_SWAP_BAD_SHARING_MODE, // Called vkCreateSwapchainKHR() with a non-supported imageSharingMode |
Jon Ashburn | 5484e0c | 2016-03-08 17:48:44 -0700 | [diff] [blame] | 52 | SWAPCHAIN_CREATE_SWAP_BAD_SHARING_VALUES, // Called vkCreateSwapchainKHR() with bad values when imageSharingMode is |
| 53 | // VK_SHARING_MODE_CONCURRENT |
Jon Ashburn | 5484e0c | 2016-03-08 17:48:44 -0700 | [diff] [blame] | 54 | SWAPCHAIN_BAD_BOOL, // VkBool32 that doesn't have value of VK_TRUE or VK_FALSE (e.g. is a non-zero form of true) |
Ian Elliott | fdf3ffa | 2016-05-05 14:06:53 -0600 | [diff] [blame] | 55 | SWAPCHAIN_PRIOR_COUNT, // Query must be called first to get value of pCount, then called second time |
Jon Ashburn | 5484e0c | 2016-03-08 17:48:44 -0700 | [diff] [blame] | 56 | SWAPCHAIN_INVALID_COUNT, // Second time a query called, the pCount value didn't match first time |
| 57 | SWAPCHAIN_WRONG_STYPE, // The sType for a struct has the wrong value |
| 58 | SWAPCHAIN_WRONG_NEXT, // The pNext for a struct is not NULL |
| 59 | SWAPCHAIN_ZERO_VALUE, // A value should be non-zero |
Jon Ashburn | 5484e0c | 2016-03-08 17:48:44 -0700 | [diff] [blame] | 60 | SWAPCHAIN_DID_NOT_QUERY_QUEUE_FAMILIES, // A function using a queueFamilyIndex was called before |
| 61 | // vkGetPhysicalDeviceQueueFamilyProperties() was called |
| 62 | SWAPCHAIN_QUEUE_FAMILY_INDEX_TOO_LARGE, // A queueFamilyIndex value is not less than pQueueFamilyPropertyCount returned by |
| 63 | // vkGetPhysicalDeviceQueueFamilyProperties() |
| 64 | SWAPCHAIN_SURFACE_NOT_SUPPORTED_WITH_QUEUE, // A surface is not supported by a given queueFamilyIndex, as seen by |
| 65 | // vkGetPhysicalDeviceSurfaceSupportKHR() |
Petros Bantolas | 2b40be7 | 2016-04-15 11:02:59 +0100 | [diff] [blame] | 66 | SWAPCHAIN_GET_SUPPORTED_DISPLAYS_WITHOUT_QUERY, // vkGetDisplayPlaneSupportedDisplaysKHR should be called after querying |
| 67 | // device display plane properties |
| 68 | SWAPCHAIN_PLANE_INDEX_TOO_LARGE, // a planeIndex value is larger than what vkGetDisplayPlaneSupportedDisplaysKHR returns |
Mark Lobodzinski | 3ae5516 | 2016-05-19 17:01:48 -0600 | [diff] [blame] | 69 | }; |
Ian Elliott | b0f474c | 2015-09-25 15:50:55 -0600 | [diff] [blame] | 70 | |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 71 | // The following is for logging error messages: |
Mark Lobodzinski | 9b482fa | 2016-08-08 09:38:42 -0600 | [diff] [blame] | 72 | const char * swapchain_layer_name = "Swapchain"; |
| 73 | |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 74 | #define LAYER_NAME (char *) "Swapchain" |
Mark Lobodzinski | 9b482fa | 2016-08-08 09:38:42 -0600 | [diff] [blame] | 75 | |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 76 | // NOTE: The following struct's/typedef's are for keeping track of |
| 77 | // info that is used for validating the WSI extensions. |
| 78 | |
| 79 | // Forward declarations: |
Mark Lobodzinski | 3ae5516 | 2016-05-19 17:01:48 -0600 | [diff] [blame] | 80 | struct SwpInstance; |
| 81 | struct SwpSurface; |
| 82 | struct SwpPhysicalDevice; |
| 83 | struct SwpDevice; |
| 84 | struct SwpSwapchain; |
| 85 | struct SwpImage; |
| 86 | struct SwpQueue; |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 87 | |
| 88 | // Create one of these for each VkInstance: |
Mark Lobodzinski | 3ae5516 | 2016-05-19 17:01:48 -0600 | [diff] [blame] | 89 | struct SwpInstance { |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 90 | // The actual handle for this VkInstance: |
| 91 | VkInstance instance; |
| 92 | |
Ian Elliott | 1f6bb80 | 2016-01-20 16:33:34 -0700 | [diff] [blame] | 93 | // Remember the VkSurfaceKHR's that are created for this VkInstance: |
Jamie Madill | 6069c82 | 2016-12-15 09:35:36 -0500 | [diff] [blame] | 94 | std::unordered_map<VkSurfaceKHR, SwpSurface *> surfaces; |
Ian Elliott | 1f6bb80 | 2016-01-20 16:33:34 -0700 | [diff] [blame] | 95 | |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 96 | // When vkEnumeratePhysicalDevices is called, the VkPhysicalDevice's are |
| 97 | // remembered: |
Jamie Madill | 6069c82 | 2016-12-15 09:35:36 -0500 | [diff] [blame] | 98 | std::unordered_map<const void *, SwpPhysicalDevice *> physicalDevices; |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 99 | |
Petros Bantolas | 2b40be7 | 2016-04-15 11:02:59 +0100 | [diff] [blame] | 100 | // Set to true if VK_KHR_DISPLAY_EXTENSION_NAME was enabled for this VkInstance: |
| 101 | bool displayExtensionEnabled; |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 102 | }; |
Jon Ashburn | 5484e0c | 2016-03-08 17:48:44 -0700 | [diff] [blame] | 103 | |
Ian Elliott | 1f6bb80 | 2016-01-20 16:33:34 -0700 | [diff] [blame] | 104 | // Create one of these for each VkSurfaceKHR: |
Mark Lobodzinski | 3ae5516 | 2016-05-19 17:01:48 -0600 | [diff] [blame] | 105 | struct SwpSurface { |
Ian Elliott | 1f6bb80 | 2016-01-20 16:33:34 -0700 | [diff] [blame] | 106 | // The actual handle for this VkSurfaceKHR: |
| 107 | VkSurfaceKHR surface; |
| 108 | |
| 109 | // VkInstance that this VkSurfaceKHR is associated with: |
| 110 | SwpInstance *pInstance; |
| 111 | |
| 112 | // When vkCreateSwapchainKHR is called, the VkSwapchainKHR's are |
| 113 | // remembered: |
Jamie Madill | 6069c82 | 2016-12-15 09:35:36 -0500 | [diff] [blame] | 114 | std::unordered_map<VkSwapchainKHR, SwpSwapchain *> swapchains; |
Ian Elliott | 680825b | 2016-01-21 12:42:19 -0700 | [diff] [blame] | 115 | |
Ian Elliott | c4db695 | 2016-01-21 14:29:45 -0700 | [diff] [blame] | 116 | // Value of pQueueFamilyPropertyCount that was returned by the |
| 117 | // vkGetPhysicalDeviceQueueFamilyProperties() function: |
| 118 | uint32_t numQueueFamilyIndexSupport; |
| 119 | // Array of VkBool32's that is intialized by the |
| 120 | // vkGetPhysicalDeviceSurfaceSupportKHR() function. First call for a given |
| 121 | // surface allocates and initializes this array to false for all |
| 122 | // queueFamilyIndex's (and sets numQueueFamilyIndexSupport to non-zero). |
| 123 | // All calls set the entry for a given queueFamilyIndex: |
| 124 | VkBool32 *pQueueFamilyIndexSupport; |
Ian Elliott | 1f6bb80 | 2016-01-20 16:33:34 -0700 | [diff] [blame] | 125 | }; |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 126 | |
| 127 | // Create one of these for each VkPhysicalDevice within a VkInstance: |
Mark Lobodzinski | 3ae5516 | 2016-05-19 17:01:48 -0600 | [diff] [blame] | 128 | struct SwpPhysicalDevice { |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 129 | // The actual handle for this VkPhysicalDevice: |
| 130 | VkPhysicalDevice physicalDevice; |
| 131 | |
| 132 | // Corresponding VkDevice (and info) to this VkPhysicalDevice: |
| 133 | SwpDevice *pDevice; |
| 134 | |
| 135 | // VkInstance that this VkPhysicalDevice is associated with: |
| 136 | SwpInstance *pInstance; |
| 137 | |
Ian Elliott | aeafe23 | 2016-01-20 10:50:33 -0700 | [diff] [blame] | 138 | // Records results of vkGetPhysicalDeviceQueueFamilyProperties()'s |
Ian Elliott | c4db695 | 2016-01-21 14:29:45 -0700 | [diff] [blame] | 139 | // numOfQueueFamilies parameter when pQueueFamilyProperties is NULL: |
Ian Elliott | aeafe23 | 2016-01-20 10:50:33 -0700 | [diff] [blame] | 140 | bool gotQueueFamilyPropertyCount; |
Ian Elliott | c4db695 | 2016-01-21 14:29:45 -0700 | [diff] [blame] | 141 | uint32_t numOfQueueFamilies; |
Ian Elliott | aeafe23 | 2016-01-20 10:50:33 -0700 | [diff] [blame] | 142 | |
Ian Elliott | c4db695 | 2016-01-21 14:29:45 -0700 | [diff] [blame] | 143 | // Record all surfaces that vkGetPhysicalDeviceSurfaceSupportKHR() was |
| 144 | // called for: |
Jamie Madill | 6069c82 | 2016-12-15 09:35:36 -0500 | [diff] [blame] | 145 | std::unordered_map<VkSurfaceKHR, SwpSurface *> supportedSurfaces; |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 146 | |
Petros Bantolas | 2b40be7 | 2016-04-15 11:02:59 +0100 | [diff] [blame] | 147 | // Count returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR(): |
| 148 | uint32_t displayPlanePropertyCount; |
| 149 | bool gotDisplayPlanePropertyCount; |
Ian Elliott | 27d39c7 | 2015-11-20 16:39:34 -0700 | [diff] [blame] | 150 | }; |
| 151 | |
| 152 | // Create one of these for each VkDevice within a VkInstance: |
Mark Lobodzinski | 3ae5516 | 2016-05-19 17:01:48 -0600 | [diff] [blame] | 153 | struct SwpDevice { |
Ian Elliott | 27d39c7 | 2015-11-20 16:39:34 -0700 | [diff] [blame] | 154 | // The actual handle for this VkDevice: |
| 155 | VkDevice device; |
| 156 | |
| 157 | // Corresponding VkPhysicalDevice (and info) to this VkDevice: |
| 158 | SwpPhysicalDevice *pPhysicalDevice; |
| 159 | |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 160 | // When vkCreateSwapchainKHR is called, the VkSwapchainKHR's are |
| 161 | // remembered: |
Jamie Madill | 6069c82 | 2016-12-15 09:35:36 -0500 | [diff] [blame] | 162 | std::unordered_map<VkSwapchainKHR, SwpSwapchain *> swapchains; |
Ian Elliott | c4db695 | 2016-01-21 14:29:45 -0700 | [diff] [blame] | 163 | |
| 164 | // When vkGetDeviceQueue is called, the VkQueue's are remembered: |
Jamie Madill | 6069c82 | 2016-12-15 09:35:36 -0500 | [diff] [blame] | 165 | std::unordered_map<VkQueue, SwpQueue *> queues; |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 166 | }; |
| 167 | |
| 168 | // Create one of these for each VkImage within a VkSwapchainKHR: |
Mark Lobodzinski | 3ae5516 | 2016-05-19 17:01:48 -0600 | [diff] [blame] | 169 | struct SwpImage { |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 170 | // The actual handle for this VkImage: |
| 171 | VkImage image; |
| 172 | |
| 173 | // Corresponding VkSwapchainKHR (and info) to this VkImage: |
| 174 | SwpSwapchain *pSwapchain; |
| 175 | |
Ian Elliott | a5d13a9 | 2016-04-07 09:05:45 -0600 | [diff] [blame] | 176 | // true if application acquired this image from vkAcquireNextImageKHR(), |
| 177 | // and hasn't yet called vkQueuePresentKHR() for it; otherwise false: |
| 178 | bool acquiredByApp; |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 179 | }; |
| 180 | |
| 181 | // Create one of these for each VkSwapchainKHR within a VkDevice: |
Mark Lobodzinski | 3ae5516 | 2016-05-19 17:01:48 -0600 | [diff] [blame] | 182 | struct SwpSwapchain { |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 183 | // The actual handle for this VkSwapchainKHR: |
| 184 | VkSwapchainKHR swapchain; |
| 185 | |
| 186 | // Corresponding VkDevice (and info) to this VkSwapchainKHR: |
| 187 | SwpDevice *pDevice; |
| 188 | |
Ian Elliott | f7f8ff0 | 2015-12-30 14:55:41 -0700 | [diff] [blame] | 189 | // Corresponding VkSurfaceKHR to this VkSwapchainKHR: |
Ian Elliott | 1f6bb80 | 2016-01-20 16:33:34 -0700 | [diff] [blame] | 190 | SwpSurface *pSurface; |
Ian Elliott | f7f8ff0 | 2015-12-30 14:55:41 -0700 | [diff] [blame] | 191 | |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 192 | // When vkGetSwapchainImagesKHR is called, the VkImage's are |
| 193 | // remembered: |
| 194 | uint32_t imageCount; |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 195 | }; |
| 196 | |
Ian Elliott | c4db695 | 2016-01-21 14:29:45 -0700 | [diff] [blame] | 197 | // Create one of these for each VkQueue within a VkDevice: |
Mark Lobodzinski | 3ae5516 | 2016-05-19 17:01:48 -0600 | [diff] [blame] | 198 | struct SwpQueue { |
Ian Elliott | c4db695 | 2016-01-21 14:29:45 -0700 | [diff] [blame] | 199 | // The actual handle for this VkQueue: |
| 200 | VkQueue queue; |
| 201 | |
| 202 | // Corresponding VkDevice (and info) to this VkSwapchainKHR: |
| 203 | SwpDevice *pDevice; |
| 204 | |
| 205 | // Which queueFamilyIndex this VkQueue is associated with: |
| 206 | uint32_t queueFamilyIndex; |
| 207 | }; |
| 208 | |
Tobin Ehlis | 711ff31 | 2015-10-29 12:58:13 -0600 | [diff] [blame] | 209 | struct layer_data { |
Chia-I Wu | a673753 | 2016-04-28 16:04:15 +0800 | [diff] [blame] | 210 | VkInstance instance; |
| 211 | |
Tobin Ehlis | 711ff31 | 2015-10-29 12:58:13 -0600 | [diff] [blame] | 212 | debug_report_data *report_data; |
Courtney Goeltzenleuchter | 7415d5a | 2015-12-09 15:48:16 -0700 | [diff] [blame] | 213 | std::vector<VkDebugReportCallbackEXT> logging_callback; |
Jon Ashburn | 5484e0c | 2016-03-08 17:48:44 -0700 | [diff] [blame] | 214 | VkLayerDispatchTable *device_dispatch_table; |
| 215 | VkLayerInstanceDispatchTable *instance_dispatch_table; |
Ian Elliott | ed6b5ac | 2016-04-28 09:08:13 -0600 | [diff] [blame] | 216 | |
| 217 | // The following are for keeping track of the temporary callbacks that can |
| 218 | // be used in vkCreateInstance and vkDestroyInstance: |
| 219 | uint32_t num_tmp_callbacks; |
| 220 | VkDebugReportCallbackCreateInfoEXT *tmp_dbg_create_infos; |
| 221 | VkDebugReportCallbackEXT *tmp_callbacks; |
| 222 | |
Tobin Ehlis | 711ff31 | 2015-10-29 12:58:13 -0600 | [diff] [blame] | 223 | // NOTE: The following are for keeping track of info that is used for |
| 224 | // validating the WSI extensions. |
Jon Ashburn | 5484e0c | 2016-03-08 17:48:44 -0700 | [diff] [blame] | 225 | std::unordered_map<void *, SwpInstance> instanceMap; |
| 226 | std::unordered_map<VkSurfaceKHR, SwpSurface> surfaceMap; |
Tobin Ehlis | 711ff31 | 2015-10-29 12:58:13 -0600 | [diff] [blame] | 227 | std::unordered_map<void *, SwpPhysicalDevice> physicalDeviceMap; |
Jon Ashburn | 5484e0c | 2016-03-08 17:48:44 -0700 | [diff] [blame] | 228 | std::unordered_map<void *, SwpDevice> deviceMap; |
| 229 | std::unordered_map<VkSwapchainKHR, SwpSwapchain> swapchainMap; |
| 230 | std::unordered_map<void *, SwpQueue> queueMap; |
Tobin Ehlis | 711ff31 | 2015-10-29 12:58:13 -0600 | [diff] [blame] | 231 | |
Ian Elliott | ed6b5ac | 2016-04-28 09:08:13 -0600 | [diff] [blame] | 232 | layer_data() |
| 233 | : report_data(nullptr), device_dispatch_table(nullptr), instance_dispatch_table(nullptr), num_tmp_callbacks(0), |
| 234 | tmp_dbg_create_infos(nullptr), tmp_callbacks(nullptr){}; |
Tobin Ehlis | 711ff31 | 2015-10-29 12:58:13 -0600 | [diff] [blame] | 235 | }; |
| 236 | |
Ian Elliott | 0b4d624 | 2015-09-22 10:51:24 -0600 | [diff] [blame] | 237 | #endif // SWAPCHAIN_H |