Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Vulkan |
| 3 | * |
| 4 | * Copyright (C) 2014 LunarG, Inc. |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 7 | * copy of this software and associated documentation files (the "Software"), |
| 8 | * to deal in the Software without restriction, including without limitation |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the |
| 11 | * Software is furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included |
| 14 | * in all copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 22 | * DEALINGS IN THE SOFTWARE. |
| 23 | */ |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 24 | #include <stdlib.h> |
| 25 | #include <string.h> |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 26 | |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 27 | #include "loader_platform.h" |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 28 | #include "loader.h" |
Jon Ashburn | cedc15f | 2015-05-21 18:13:33 -0600 | [diff] [blame] | 29 | #include "wsi_lunarg.h" |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 30 | #include "debug_report.h" |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 31 | |
Tobin Ehlis | 3126f01 | 2015-05-13 11:57:18 -0600 | [diff] [blame] | 32 | #if defined(WIN32) |
| 33 | // On Windows need to disable global optimization for function entrypoints or |
| 34 | // else mhook will not be able to hook all of them |
| 35 | #pragma optimize( "g", off ) |
| 36 | #endif |
| 37 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 38 | /* Trampoline entrypoints */ |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 39 | LOADER_EXPORT VkResult VKAPI vkCreateInstance( |
Courtney Goeltzenleuchter | 70c4ebc | 2015-06-08 15:13:50 -0600 | [diff] [blame] | 40 | const VkInstanceCreateInfo* pCreateInfo, |
| 41 | VkInstance* pInstance) |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 42 | { |
| 43 | struct loader_instance *ptr_instance = NULL; |
| 44 | |
| 45 | VkResult res = VK_ERROR_INITIALIZATION_FAILED; |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 46 | |
| 47 | /* Scan/discover all ICD libraries in a single-threaded manner */ |
| 48 | loader_platform_thread_once(&once_icd, loader_icd_scan); |
| 49 | |
| 50 | /* get layer libraries in a single-threaded manner */ |
| 51 | loader_platform_thread_once(&once_layer, layer_lib_scan); |
| 52 | |
| 53 | /* merge any duplicate extensions */ |
| 54 | loader_platform_thread_once(&once_exts, loader_coalesce_extensions); |
| 55 | |
| 56 | ptr_instance = (struct loader_instance*) malloc(sizeof(struct loader_instance)); |
| 57 | if (ptr_instance == NULL) { |
| 58 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
| 59 | } |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 60 | loader_platform_thread_lock_mutex(&loader_lock); |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 61 | memset(ptr_instance, 0, sizeof(struct loader_instance)); |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 62 | ptr_instance->app_extension_count = pCreateInfo->extensionCount; |
| 63 | ptr_instance->app_extension_props = (ptr_instance->app_extension_count > 0) ? |
| 64 | malloc(sizeof (VkExtensionProperties) * ptr_instance->app_extension_count) : NULL; |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 65 | if (ptr_instance->app_extension_props == NULL && (ptr_instance->app_extension_count > 0)) { |
| 66 | loader_platform_thread_unlock_mutex(&loader_lock); |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 67 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 68 | } |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 69 | |
| 70 | /* |
| 71 | * Make local copy of extension properties indicated by application. |
| 72 | */ |
| 73 | if (ptr_instance->app_extension_props) { |
| 74 | memcpy(ptr_instance->app_extension_props, |
| 75 | pCreateInfo->pEnabledExtensions, |
| 76 | sizeof(VkExtensionProperties) * ptr_instance->app_extension_count); |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 77 | } |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 78 | |
Jon Ashburn | bfa43b7 | 2015-05-19 14:33:18 -0600 | [diff] [blame] | 79 | ptr_instance->disp = malloc(sizeof(VkLayerInstanceDispatchTable)); |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 80 | if (ptr_instance->disp == NULL) { |
| 81 | loader_platform_thread_unlock_mutex(&loader_lock); |
Jon Ashburn | bfa43b7 | 2015-05-19 14:33:18 -0600 | [diff] [blame] | 82 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 83 | } |
Jon Ashburn | bfa43b7 | 2015-05-19 14:33:18 -0600 | [diff] [blame] | 84 | memcpy(ptr_instance->disp, &instance_disp, sizeof(instance_disp)); |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 85 | ptr_instance->next = loader.instances; |
| 86 | loader.instances = ptr_instance; |
Jon Ashburn | cedc15f | 2015-05-21 18:13:33 -0600 | [diff] [blame] | 87 | |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 88 | loader_enable_instance_layers(ptr_instance); |
| 89 | |
| 90 | debug_report_create_instance(ptr_instance); |
| 91 | wsi_lunarg_create_instance(ptr_instance); |
Jon Ashburn | cedc15f | 2015-05-21 18:13:33 -0600 | [diff] [blame] | 92 | |
| 93 | /* enable any layers on instance chain */ |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 94 | loader_activate_instance_layers(ptr_instance); |
| 95 | |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 96 | *pInstance = (VkInstance) ptr_instance; |
Jon Ashburn | a179dcf | 2015-05-21 17:42:17 -0600 | [diff] [blame] | 97 | |
| 98 | res = ptr_instance->disp->CreateInstance(pCreateInfo, pInstance); |
| 99 | |
Courtney Goeltzenleuchter | 23b5f8d | 2015-06-17 20:51:59 -0600 | [diff] [blame] | 100 | /* |
| 101 | * Finally have the layers in place and everyone has seen |
| 102 | * the CreateInstance command go by. This allows the layer's |
| 103 | * GetInstanceProcAddr functions to return valid extension functions |
| 104 | * if enabled. |
| 105 | */ |
| 106 | loader_activate_instance_layer_extensions(ptr_instance); |
| 107 | |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 108 | loader_platform_thread_unlock_mutex(&loader_lock); |
| 109 | |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 110 | return res; |
| 111 | } |
| 112 | |
| 113 | LOADER_EXPORT VkResult VKAPI vkDestroyInstance( |
| 114 | VkInstance instance) |
| 115 | { |
| 116 | const VkLayerInstanceDispatchTable *disp; |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 117 | VkResult res; |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 118 | disp = loader_get_instance_dispatch(instance); |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 119 | |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 120 | loader_platform_thread_lock_mutex(&loader_lock); |
| 121 | |
| 122 | res = disp->DestroyInstance(instance); |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 123 | |
Courtney Goeltzenleuchter | 3d8dc1f | 2015-06-08 15:09:22 -0600 | [diff] [blame] | 124 | struct loader_instance *ptr_instance = loader_instance(instance); |
| 125 | loader_deactivate_instance_layers(ptr_instance); |
| 126 | loader_destroy_ext_list(&ptr_instance->enabled_instance_extensions); |
| 127 | loader_destroy_ext_list(&ptr_instance->activated_layer_list); |
| 128 | |
| 129 | free(ptr_instance); |
| 130 | |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 131 | loader_platform_thread_unlock_mutex(&loader_lock); |
| 132 | |
Courtney Goeltzenleuchter | 3d8dc1f | 2015-06-08 15:09:22 -0600 | [diff] [blame] | 133 | return res; |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 134 | } |
Jon Ashburn | 2666e2f | 2015-05-15 15:09:35 -0600 | [diff] [blame] | 135 | |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 136 | LOADER_EXPORT VkResult VKAPI vkEnumeratePhysicalDevices( |
| 137 | VkInstance instance, |
| 138 | uint32_t* pPhysicalDeviceCount, |
| 139 | VkPhysicalDevice* pPhysicalDevices) |
| 140 | { |
| 141 | const VkLayerInstanceDispatchTable *disp; |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 142 | VkResult res; |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 143 | disp = loader_get_instance_dispatch(instance); |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 144 | |
| 145 | loader_platform_thread_lock_mutex(&loader_lock); |
| 146 | res = disp->EnumeratePhysicalDevices(instance, pPhysicalDeviceCount, |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 147 | pPhysicalDevices); |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 148 | loader_platform_thread_unlock_mutex(&loader_lock); |
| 149 | return res; |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 150 | } |
| 151 | |
| 152 | LOADER_EXPORT VkResult VKAPI vkGetPhysicalDeviceInfo( |
| 153 | VkPhysicalDevice gpu, |
| 154 | VkPhysicalDeviceInfoType infoType, |
| 155 | size_t* pDataSize, |
| 156 | void* pData) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 157 | { |
Jon Ashburn | 2666e2f | 2015-05-15 15:09:35 -0600 | [diff] [blame] | 158 | const VkLayerInstanceDispatchTable *disp; |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 159 | VkResult res; |
| 160 | |
Jon Ashburn | 2666e2f | 2015-05-15 15:09:35 -0600 | [diff] [blame] | 161 | disp = loader_get_instance_dispatch(gpu); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 162 | |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 163 | loader_platform_thread_lock_mutex(&loader_lock); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 164 | res = disp->GetPhysicalDeviceInfo(gpu, infoType, pDataSize, pData); |
Jon Ashburn | 2666e2f | 2015-05-15 15:09:35 -0600 | [diff] [blame] | 165 | //TODO add check for extension enabled |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 166 | loader_platform_thread_unlock_mutex(&loader_lock); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 167 | if (infoType == VK_PHYSICAL_DEVICE_INFO_TYPE_DISPLAY_PROPERTIES_WSI && pData && res == VK_SUCCESS) { |
| 168 | VkDisplayPropertiesWSI *info = pData; |
| 169 | size_t count = *pDataSize / sizeof(*info), i; |
| 170 | for (i = 0; i < count; i++) { |
| 171 | loader_set_dispatch(info[i].display, disp); |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | return res; |
| 176 | } |
| 177 | |
Jon Ashburn | 2666e2f | 2015-05-15 15:09:35 -0600 | [diff] [blame] | 178 | LOADER_EXPORT VkResult VKAPI vkCreateDevice( |
| 179 | VkPhysicalDevice gpu, |
| 180 | const VkDeviceCreateInfo* pCreateInfo, |
| 181 | VkDevice* pDevice) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 182 | { |
Jon Ashburn | 2666e2f | 2015-05-15 15:09:35 -0600 | [diff] [blame] | 183 | const VkLayerInstanceDispatchTable *disp; |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 184 | VkResult res; |
| 185 | |
Jon Ashburn | 2666e2f | 2015-05-15 15:09:35 -0600 | [diff] [blame] | 186 | disp = loader_get_instance_dispatch(gpu); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 187 | |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 188 | loader_platform_thread_lock_mutex(&loader_lock); |
Jon Ashburn | 2666e2f | 2015-05-15 15:09:35 -0600 | [diff] [blame] | 189 | // CreateDevice is dispatched on the instance chain |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 190 | res = disp->CreateDevice(gpu, pCreateInfo, pDevice); |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 191 | loader_platform_thread_unlock_mutex(&loader_lock); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 192 | return res; |
| 193 | } |
| 194 | |
| 195 | LOADER_EXPORT VkResult VKAPI vkDestroyDevice(VkDevice device) |
| 196 | { |
| 197 | const VkLayerDispatchTable *disp; |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 198 | VkResult res; |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 199 | |
| 200 | disp = loader_get_dispatch(device); |
| 201 | |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 202 | loader_platform_thread_lock_mutex(&loader_lock); |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 203 | res = disp->DestroyDevice(device); |
| 204 | // TODO need to keep track of device objs to be able to get icd/gpu to deactivate |
| 205 | //loader_deactivate_device_layer(device); |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 206 | loader_platform_thread_unlock_mutex(&loader_lock); |
| 207 | return res; |
| 208 | } |
| 209 | |
| 210 | LOADER_EXPORT VkResult VKAPI vkGetPhysicalDeviceExtensionInfo( |
| 211 | VkPhysicalDevice gpu, |
| 212 | VkExtensionInfoType infoType, |
| 213 | uint32_t extensionIndex, |
| 214 | size_t* pDataSize, |
| 215 | void* pData) |
| 216 | { |
| 217 | VkResult res; |
| 218 | |
| 219 | loader_platform_thread_lock_mutex(&loader_lock); |
| 220 | res = loader_GetPhysicalDeviceExtensionInfo(gpu, infoType, extensionIndex, pDataSize, pData); |
| 221 | loader_platform_thread_unlock_mutex(&loader_lock); |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 222 | return res; |
| 223 | } |
| 224 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 225 | LOADER_EXPORT VkResult VKAPI vkGetDeviceQueue(VkDevice device, uint32_t queueNodeIndex, uint32_t queueIndex, VkQueue* pQueue) |
| 226 | { |
| 227 | const VkLayerDispatchTable *disp; |
| 228 | VkResult res; |
| 229 | |
| 230 | disp = loader_get_dispatch(device); |
| 231 | |
| 232 | res = disp->GetDeviceQueue(device, queueNodeIndex, queueIndex, pQueue); |
| 233 | if (res == VK_SUCCESS) { |
| 234 | loader_set_dispatch(*pQueue, disp); |
| 235 | } |
| 236 | |
| 237 | return res; |
| 238 | } |
| 239 | |
| 240 | LOADER_EXPORT VkResult VKAPI vkQueueSubmit(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence) |
| 241 | { |
| 242 | const VkLayerDispatchTable *disp; |
| 243 | |
| 244 | disp = loader_get_dispatch(queue); |
| 245 | |
| 246 | return disp->QueueSubmit(queue, cmdBufferCount, pCmdBuffers, fence); |
| 247 | } |
| 248 | |
| 249 | LOADER_EXPORT VkResult VKAPI vkQueueWaitIdle(VkQueue queue) |
| 250 | { |
| 251 | const VkLayerDispatchTable *disp; |
| 252 | |
| 253 | disp = loader_get_dispatch(queue); |
| 254 | |
| 255 | return disp->QueueWaitIdle(queue); |
| 256 | } |
| 257 | |
| 258 | LOADER_EXPORT VkResult VKAPI vkDeviceWaitIdle(VkDevice device) |
| 259 | { |
| 260 | const VkLayerDispatchTable *disp; |
| 261 | |
| 262 | disp = loader_get_dispatch(device); |
| 263 | |
| 264 | return disp->DeviceWaitIdle(device); |
| 265 | } |
| 266 | |
| 267 | LOADER_EXPORT VkResult VKAPI vkAllocMemory(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, VkDeviceMemory* pMem) |
| 268 | { |
| 269 | const VkLayerDispatchTable *disp; |
| 270 | |
| 271 | disp = loader_get_dispatch(device); |
| 272 | |
| 273 | return disp->AllocMemory(device, pAllocInfo, pMem); |
| 274 | } |
| 275 | |
| 276 | LOADER_EXPORT VkResult VKAPI vkFreeMemory(VkDevice device, VkDeviceMemory mem) |
| 277 | { |
| 278 | const VkLayerDispatchTable *disp; |
| 279 | |
| 280 | disp = loader_get_dispatch(device); |
| 281 | |
| 282 | return disp->FreeMemory(device, mem); |
| 283 | } |
| 284 | |
| 285 | LOADER_EXPORT VkResult VKAPI vkSetMemoryPriority(VkDevice device, VkDeviceMemory mem, VkMemoryPriority priority) |
| 286 | { |
| 287 | const VkLayerDispatchTable *disp; |
| 288 | |
| 289 | disp = loader_get_dispatch(device); |
| 290 | |
| 291 | return disp->SetMemoryPriority(device, mem, priority); |
| 292 | } |
| 293 | |
| 294 | LOADER_EXPORT VkResult VKAPI vkMapMemory(VkDevice device, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size, VkFlags flags, void** ppData) |
| 295 | { |
| 296 | const VkLayerDispatchTable *disp; |
| 297 | |
| 298 | disp = loader_get_dispatch(device); |
| 299 | |
| 300 | return disp->MapMemory(device, mem, offset, size, flags, ppData); |
| 301 | } |
| 302 | |
| 303 | LOADER_EXPORT VkResult VKAPI vkUnmapMemory(VkDevice device, VkDeviceMemory mem) |
| 304 | { |
| 305 | const VkLayerDispatchTable *disp; |
| 306 | |
| 307 | disp = loader_get_dispatch(device); |
| 308 | |
| 309 | return disp->UnmapMemory(device, mem); |
| 310 | } |
| 311 | |
| 312 | LOADER_EXPORT VkResult VKAPI vkFlushMappedMemoryRanges(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges) |
| 313 | { |
| 314 | const VkLayerDispatchTable *disp; |
| 315 | |
| 316 | disp = loader_get_dispatch(device); |
| 317 | |
| 318 | return disp->FlushMappedMemoryRanges(device, memRangeCount, pMemRanges); |
| 319 | } |
| 320 | |
| 321 | LOADER_EXPORT VkResult VKAPI vkInvalidateMappedMemoryRanges(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges) |
| 322 | { |
| 323 | const VkLayerDispatchTable *disp; |
| 324 | |
| 325 | disp = loader_get_dispatch(device); |
| 326 | |
| 327 | return disp->InvalidateMappedMemoryRanges(device, memRangeCount, pMemRanges); |
| 328 | } |
| 329 | |
| 330 | LOADER_EXPORT VkResult VKAPI vkPinSystemMemory(VkDevice device, const void* pSysMem, size_t memSize, VkDeviceMemory* pMem) |
| 331 | { |
| 332 | const VkLayerDispatchTable *disp; |
| 333 | |
| 334 | disp = loader_get_dispatch(device); |
| 335 | |
| 336 | return disp->PinSystemMemory(device, pSysMem, memSize, pMem); |
| 337 | } |
| 338 | |
| 339 | LOADER_EXPORT VkResult VKAPI vkGetMultiDeviceCompatibility(VkPhysicalDevice gpu0, VkPhysicalDevice gpu1, VkPhysicalDeviceCompatibilityInfo* pInfo) |
| 340 | { |
Jon Ashburn | 2666e2f | 2015-05-15 15:09:35 -0600 | [diff] [blame] | 341 | const VkLayerInstanceDispatchTable *disp; |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 342 | VkResult res; |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 343 | |
Jon Ashburn | 2666e2f | 2015-05-15 15:09:35 -0600 | [diff] [blame] | 344 | disp = loader_get_instance_dispatch(gpu0); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 345 | |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 346 | loader_platform_thread_lock_mutex(&loader_lock); |
| 347 | res = disp->GetMultiDeviceCompatibility(gpu0, gpu1, pInfo); |
| 348 | loader_platform_thread_unlock_mutex(&loader_lock); |
| 349 | return res; |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 350 | } |
| 351 | |
| 352 | LOADER_EXPORT VkResult VKAPI vkOpenSharedMemory(VkDevice device, const VkMemoryOpenInfo* pOpenInfo, VkDeviceMemory* pMem) |
| 353 | { |
| 354 | const VkLayerDispatchTable *disp; |
| 355 | |
| 356 | disp = loader_get_dispatch(device); |
| 357 | |
| 358 | return disp->OpenSharedMemory(device, pOpenInfo, pMem); |
| 359 | } |
| 360 | |
| 361 | LOADER_EXPORT VkResult VKAPI vkOpenSharedSemaphore(VkDevice device, const VkSemaphoreOpenInfo* pOpenInfo, VkSemaphore* pSemaphore) |
| 362 | { |
| 363 | const VkLayerDispatchTable *disp; |
| 364 | |
| 365 | disp = loader_get_dispatch(device); |
| 366 | |
| 367 | return disp->OpenSharedSemaphore(device, pOpenInfo, pSemaphore); |
| 368 | } |
| 369 | |
| 370 | LOADER_EXPORT VkResult VKAPI vkOpenPeerMemory(VkDevice device, const VkPeerMemoryOpenInfo* pOpenInfo, VkDeviceMemory* pMem) |
| 371 | { |
| 372 | const VkLayerDispatchTable *disp; |
| 373 | |
| 374 | disp = loader_get_dispatch(device); |
| 375 | |
| 376 | return disp->OpenPeerMemory(device, pOpenInfo, pMem); |
| 377 | } |
| 378 | |
| 379 | LOADER_EXPORT VkResult VKAPI vkOpenPeerImage(VkDevice device, const VkPeerImageOpenInfo* pOpenInfo, VkImage* pImage, VkDeviceMemory* pMem) |
| 380 | { |
| 381 | const VkLayerDispatchTable *disp; |
| 382 | |
| 383 | disp = loader_get_dispatch(device); |
| 384 | |
| 385 | return disp->OpenPeerImage(device, pOpenInfo, pImage, pMem); |
| 386 | } |
| 387 | |
| 388 | LOADER_EXPORT VkResult VKAPI vkDestroyObject(VkDevice device, VkObjectType objType, VkObject object) |
| 389 | { |
| 390 | const VkLayerDispatchTable *disp; |
| 391 | |
| 392 | disp = loader_get_dispatch(device); |
| 393 | |
| 394 | return disp->DestroyObject(device, objType, object); |
| 395 | } |
| 396 | |
| 397 | LOADER_EXPORT VkResult VKAPI vkGetObjectInfo(VkDevice device, VkObjectType objType, VkObject object, VkObjectInfoType infoType, size_t* pDataSize, void* pData) |
| 398 | { |
| 399 | const VkLayerDispatchTable *disp; |
| 400 | |
| 401 | disp = loader_get_dispatch(device); |
| 402 | |
| 403 | return disp->GetObjectInfo(device, objType, object, infoType, pDataSize, pData); |
| 404 | } |
| 405 | |
Mark Lobodzinski | 2318261 | 2015-05-29 09:32:35 -0500 | [diff] [blame] | 406 | LOADER_EXPORT VkResult VKAPI vkBindObjectMemory(VkDevice device, VkObjectType objType, VkObject object, VkDeviceMemory mem, VkDeviceSize offset) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 407 | { |
| 408 | const VkLayerDispatchTable *disp; |
| 409 | |
Mark Lobodzinski | fb9f564 | 2015-05-11 17:21:15 -0500 | [diff] [blame] | 410 | disp = loader_get_dispatch(device); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 411 | |
Mark Lobodzinski | 2318261 | 2015-05-29 09:32:35 -0500 | [diff] [blame] | 412 | return disp->BindObjectMemory(device, objType, object, mem, offset); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 413 | } |
| 414 | |
Mark Lobodzinski | 2318261 | 2015-05-29 09:32:35 -0500 | [diff] [blame] | 415 | LOADER_EXPORT VkResult VKAPI vkQueueBindSparseBufferMemory(VkQueue queue, VkBuffer buffer, VkDeviceSize rangeOffset, VkDeviceSize rangeSize, VkDeviceMemory mem, VkDeviceSize memOffset) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 416 | { |
| 417 | const VkLayerDispatchTable *disp; |
| 418 | |
| 419 | disp = loader_get_dispatch(queue); |
| 420 | |
Mark Lobodzinski | 2318261 | 2015-05-29 09:32:35 -0500 | [diff] [blame] | 421 | return disp->QueueBindSparseBufferMemory(queue, buffer, rangeOffset, rangeSize, mem, memOffset); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 422 | } |
| 423 | |
Mark Lobodzinski | 2318261 | 2015-05-29 09:32:35 -0500 | [diff] [blame] | 424 | LOADER_EXPORT VkResult VKAPI vkQueueBindSparseImageMemory(VkQueue queue, VkImage image, const VkImageMemoryBindInfo* pBindInfo, VkDeviceMemory mem, VkDeviceSize memOffset) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 425 | { |
| 426 | const VkLayerDispatchTable *disp; |
| 427 | |
| 428 | disp = loader_get_dispatch(queue); |
| 429 | |
Mark Lobodzinski | 2318261 | 2015-05-29 09:32:35 -0500 | [diff] [blame] | 430 | return disp->QueueBindSparseImageMemory(queue, image, pBindInfo, mem, memOffset); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 431 | } |
| 432 | |
| 433 | LOADER_EXPORT VkResult VKAPI vkCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence) |
| 434 | { |
| 435 | const VkLayerDispatchTable *disp; |
| 436 | |
| 437 | disp = loader_get_dispatch(device); |
| 438 | |
| 439 | return disp->CreateFence(device, pCreateInfo, pFence); |
| 440 | } |
| 441 | |
| 442 | LOADER_EXPORT VkResult VKAPI vkResetFences(VkDevice device, uint32_t fenceCount, VkFence* pFences) |
| 443 | { |
| 444 | const VkLayerDispatchTable *disp; |
| 445 | |
| 446 | disp = loader_get_dispatch(device); |
| 447 | |
| 448 | return disp->ResetFences(device, fenceCount, pFences); |
| 449 | } |
| 450 | |
| 451 | LOADER_EXPORT VkResult VKAPI vkGetFenceStatus(VkDevice device, VkFence fence) |
| 452 | { |
| 453 | const VkLayerDispatchTable *disp; |
| 454 | |
| 455 | disp = loader_get_dispatch(device); |
| 456 | |
| 457 | return disp->GetFenceStatus(device, fence); |
| 458 | } |
| 459 | |
| 460 | LOADER_EXPORT VkResult VKAPI vkWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, bool32_t waitAll, uint64_t timeout) |
| 461 | { |
| 462 | const VkLayerDispatchTable *disp; |
| 463 | |
| 464 | disp = loader_get_dispatch(device); |
| 465 | |
| 466 | return disp->WaitForFences(device, fenceCount, pFences, waitAll, timeout); |
| 467 | } |
| 468 | |
| 469 | LOADER_EXPORT VkResult VKAPI vkCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, VkSemaphore* pSemaphore) |
| 470 | { |
| 471 | const VkLayerDispatchTable *disp; |
| 472 | |
| 473 | disp = loader_get_dispatch(device); |
| 474 | |
| 475 | return disp->CreateSemaphore(device, pCreateInfo, pSemaphore); |
| 476 | } |
| 477 | |
| 478 | LOADER_EXPORT VkResult VKAPI vkQueueSignalSemaphore(VkQueue queue, VkSemaphore semaphore) |
| 479 | { |
| 480 | const VkLayerDispatchTable *disp; |
| 481 | |
| 482 | disp = loader_get_dispatch(queue); |
| 483 | |
| 484 | return disp->QueueSignalSemaphore(queue, semaphore); |
| 485 | } |
| 486 | |
| 487 | LOADER_EXPORT VkResult VKAPI vkQueueWaitSemaphore(VkQueue queue, VkSemaphore semaphore) |
| 488 | { |
| 489 | const VkLayerDispatchTable *disp; |
| 490 | |
| 491 | disp = loader_get_dispatch(queue); |
| 492 | |
| 493 | return disp->QueueWaitSemaphore(queue, semaphore); |
| 494 | } |
| 495 | |
| 496 | LOADER_EXPORT VkResult VKAPI vkCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, VkEvent* pEvent) |
| 497 | { |
| 498 | const VkLayerDispatchTable *disp; |
| 499 | |
| 500 | disp = loader_get_dispatch(device); |
| 501 | |
| 502 | return disp->CreateEvent(device, pCreateInfo, pEvent); |
| 503 | } |
| 504 | |
| 505 | LOADER_EXPORT VkResult VKAPI vkGetEventStatus(VkDevice device, VkEvent event) |
| 506 | { |
| 507 | const VkLayerDispatchTable *disp; |
| 508 | |
| 509 | disp = loader_get_dispatch(device); |
| 510 | |
| 511 | return disp->GetEventStatus(device, event); |
| 512 | } |
| 513 | |
| 514 | LOADER_EXPORT VkResult VKAPI vkSetEvent(VkDevice device, VkEvent event) |
| 515 | { |
| 516 | const VkLayerDispatchTable *disp; |
| 517 | |
| 518 | disp = loader_get_dispatch(device); |
| 519 | |
| 520 | return disp->SetEvent(device, event); |
| 521 | } |
| 522 | |
| 523 | LOADER_EXPORT VkResult VKAPI vkResetEvent(VkDevice device, VkEvent event) |
| 524 | { |
| 525 | const VkLayerDispatchTable *disp; |
| 526 | |
| 527 | disp = loader_get_dispatch(device); |
| 528 | |
| 529 | return disp->ResetEvent(device, event); |
| 530 | } |
| 531 | |
| 532 | LOADER_EXPORT VkResult VKAPI vkCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, VkQueryPool* pQueryPool) |
| 533 | { |
| 534 | const VkLayerDispatchTable *disp; |
| 535 | |
| 536 | disp = loader_get_dispatch(device); |
| 537 | |
| 538 | return disp->CreateQueryPool(device, pCreateInfo, pQueryPool); |
| 539 | } |
| 540 | |
| 541 | LOADER_EXPORT VkResult VKAPI vkGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData, VkQueryResultFlags flags) |
| 542 | { |
| 543 | const VkLayerDispatchTable *disp; |
| 544 | |
| 545 | disp = loader_get_dispatch(device); |
| 546 | |
| 547 | return disp->GetQueryPoolResults(device, queryPool, startQuery, queryCount, pDataSize, pData, flags); |
| 548 | } |
| 549 | |
| 550 | LOADER_EXPORT VkResult VKAPI vkGetFormatInfo(VkDevice device, VkFormat format, VkFormatInfoType infoType, size_t* pDataSize, void* pData) |
| 551 | { |
| 552 | const VkLayerDispatchTable *disp; |
| 553 | |
| 554 | disp = loader_get_dispatch(device); |
| 555 | |
| 556 | return disp->GetFormatInfo(device, format, infoType, pDataSize, pData); |
| 557 | } |
| 558 | |
| 559 | LOADER_EXPORT VkResult VKAPI vkCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer) |
| 560 | { |
| 561 | const VkLayerDispatchTable *disp; |
| 562 | |
| 563 | disp = loader_get_dispatch(device); |
| 564 | |
| 565 | return disp->CreateBuffer(device, pCreateInfo, pBuffer); |
| 566 | } |
| 567 | |
| 568 | LOADER_EXPORT VkResult VKAPI vkCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView) |
| 569 | { |
| 570 | const VkLayerDispatchTable *disp; |
| 571 | |
| 572 | disp = loader_get_dispatch(device); |
| 573 | |
| 574 | return disp->CreateBufferView(device, pCreateInfo, pView); |
| 575 | } |
| 576 | |
| 577 | LOADER_EXPORT VkResult VKAPI vkCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, VkImage* pImage) |
| 578 | { |
| 579 | const VkLayerDispatchTable *disp; |
| 580 | |
| 581 | disp = loader_get_dispatch(device); |
| 582 | |
| 583 | return disp->CreateImage(device, pCreateInfo, pImage); |
| 584 | } |
| 585 | |
| 586 | LOADER_EXPORT VkResult VKAPI vkGetImageSubresourceInfo(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceInfoType infoType, size_t* pDataSize, void* pData) |
| 587 | { |
| 588 | const VkLayerDispatchTable *disp; |
| 589 | |
| 590 | disp = loader_get_dispatch(device); |
| 591 | |
| 592 | return disp->GetImageSubresourceInfo(device, image, pSubresource, infoType, pDataSize, pData); |
| 593 | } |
| 594 | |
| 595 | LOADER_EXPORT VkResult VKAPI vkCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView) |
| 596 | { |
| 597 | const VkLayerDispatchTable *disp; |
| 598 | |
| 599 | disp = loader_get_dispatch(device); |
| 600 | |
| 601 | return disp->CreateImageView(device, pCreateInfo, pView); |
| 602 | } |
| 603 | |
| 604 | LOADER_EXPORT VkResult VKAPI vkCreateColorAttachmentView(VkDevice device, const VkColorAttachmentViewCreateInfo* pCreateInfo, VkColorAttachmentView* pView) |
| 605 | { |
| 606 | const VkLayerDispatchTable *disp; |
| 607 | |
| 608 | disp = loader_get_dispatch(device); |
| 609 | |
| 610 | return disp->CreateColorAttachmentView(device, pCreateInfo, pView); |
| 611 | } |
| 612 | |
| 613 | LOADER_EXPORT VkResult VKAPI vkCreateDepthStencilView(VkDevice device, const VkDepthStencilViewCreateInfo* pCreateInfo, VkDepthStencilView* pView) |
| 614 | { |
| 615 | const VkLayerDispatchTable *disp; |
| 616 | |
| 617 | disp = loader_get_dispatch(device); |
| 618 | |
| 619 | return disp->CreateDepthStencilView(device, pCreateInfo, pView); |
| 620 | } |
| 621 | |
| 622 | LOADER_EXPORT VkResult VKAPI vkCreateShader(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader) |
| 623 | { |
| 624 | const VkLayerDispatchTable *disp; |
| 625 | |
| 626 | disp = loader_get_dispatch(device); |
| 627 | |
| 628 | return disp->CreateShader(device, pCreateInfo, pShader); |
| 629 | } |
| 630 | |
| 631 | LOADER_EXPORT VkResult VKAPI vkCreateGraphicsPipeline(VkDevice device, const VkGraphicsPipelineCreateInfo* pCreateInfo, VkPipeline* pPipeline) |
| 632 | { |
| 633 | const VkLayerDispatchTable *disp; |
| 634 | |
| 635 | disp = loader_get_dispatch(device); |
| 636 | |
| 637 | return disp->CreateGraphicsPipeline(device, pCreateInfo, pPipeline); |
| 638 | } |
| 639 | |
| 640 | LOADER_EXPORT VkResult VKAPI vkCreateGraphicsPipelineDerivative(VkDevice device, const VkGraphicsPipelineCreateInfo* pCreateInfo, VkPipeline basePipeline, VkPipeline* pPipeline) |
| 641 | { |
| 642 | const VkLayerDispatchTable *disp; |
| 643 | |
| 644 | disp = loader_get_dispatch(device); |
| 645 | |
| 646 | return disp->CreateGraphicsPipelineDerivative(device, pCreateInfo, basePipeline, pPipeline); |
| 647 | } |
| 648 | |
| 649 | LOADER_EXPORT VkResult VKAPI vkCreateComputePipeline(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, VkPipeline* pPipeline) |
| 650 | { |
| 651 | const VkLayerDispatchTable *disp; |
| 652 | |
| 653 | disp = loader_get_dispatch(device); |
| 654 | |
| 655 | return disp->CreateComputePipeline(device, pCreateInfo, pPipeline); |
| 656 | } |
| 657 | |
| 658 | LOADER_EXPORT VkResult VKAPI vkStorePipeline(VkDevice device, VkPipeline pipeline, size_t* pDataSize, void* pData) |
| 659 | { |
| 660 | const VkLayerDispatchTable *disp; |
| 661 | |
| 662 | disp = loader_get_dispatch(device); |
| 663 | |
| 664 | return disp->StorePipeline(device, pipeline, pDataSize, pData); |
| 665 | } |
| 666 | |
| 667 | LOADER_EXPORT VkResult VKAPI vkLoadPipeline(VkDevice device, size_t dataSize, const void* pData, VkPipeline* pPipeline) |
| 668 | { |
| 669 | const VkLayerDispatchTable *disp; |
| 670 | |
| 671 | disp = loader_get_dispatch(device); |
| 672 | |
| 673 | return disp->LoadPipeline(device, dataSize, pData, pPipeline); |
| 674 | } |
| 675 | |
| 676 | LOADER_EXPORT VkResult VKAPI vkLoadPipelineDerivative(VkDevice device, size_t dataSize, const void* pData, VkPipeline basePipeline, VkPipeline* pPipeline) |
| 677 | { |
| 678 | const VkLayerDispatchTable *disp; |
| 679 | |
| 680 | disp = loader_get_dispatch(device); |
| 681 | |
| 682 | return disp->LoadPipelineDerivative(device, dataSize, pData, basePipeline, pPipeline); |
| 683 | } |
| 684 | |
| 685 | LOADER_EXPORT VkResult VKAPI vkCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, VkPipelineLayout* pPipelineLayout) |
| 686 | { |
| 687 | const VkLayerDispatchTable *disp; |
| 688 | |
| 689 | disp = loader_get_dispatch(device); |
| 690 | |
| 691 | return disp->CreatePipelineLayout(device, pCreateInfo, pPipelineLayout); |
| 692 | } |
| 693 | |
| 694 | LOADER_EXPORT VkResult VKAPI vkCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler) |
| 695 | { |
| 696 | const VkLayerDispatchTable *disp; |
| 697 | |
| 698 | disp = loader_get_dispatch(device); |
| 699 | |
| 700 | return disp->CreateSampler(device, pCreateInfo, pSampler); |
| 701 | } |
| 702 | |
| 703 | LOADER_EXPORT VkResult VKAPI vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout) |
| 704 | { |
| 705 | const VkLayerDispatchTable *disp; |
| 706 | |
| 707 | disp = loader_get_dispatch(device); |
| 708 | |
| 709 | return disp->CreateDescriptorSetLayout(device, pCreateInfo, pSetLayout); |
| 710 | } |
| 711 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 712 | LOADER_EXPORT VkResult VKAPI vkCreateDescriptorPool(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool) |
| 713 | { |
| 714 | const VkLayerDispatchTable *disp; |
| 715 | |
| 716 | disp = loader_get_dispatch(device); |
| 717 | |
| 718 | return disp->CreateDescriptorPool(device, poolUsage, maxSets, pCreateInfo, pDescriptorPool); |
| 719 | } |
| 720 | |
| 721 | LOADER_EXPORT VkResult VKAPI vkResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool) |
| 722 | { |
| 723 | const VkLayerDispatchTable *disp; |
| 724 | |
| 725 | disp = loader_get_dispatch(device); |
| 726 | |
| 727 | return disp->ResetDescriptorPool(device, descriptorPool); |
| 728 | } |
| 729 | |
| 730 | LOADER_EXPORT VkResult VKAPI vkAllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount) |
| 731 | { |
| 732 | const VkLayerDispatchTable *disp; |
| 733 | |
| 734 | disp = loader_get_dispatch(device); |
| 735 | |
| 736 | return disp->AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets, pCount); |
| 737 | } |
| 738 | |
| 739 | LOADER_EXPORT void VKAPI vkClearDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets) |
| 740 | { |
| 741 | const VkLayerDispatchTable *disp; |
| 742 | |
| 743 | disp = loader_get_dispatch(device); |
| 744 | |
| 745 | disp->ClearDescriptorSets(device, descriptorPool, count, pDescriptorSets); |
| 746 | } |
| 747 | |
Chia-I Wu | 8cd8ecd | 2015-05-25 16:27:55 +0800 | [diff] [blame] | 748 | LOADER_EXPORT VkResult VKAPI vkUpdateDescriptorSets(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 749 | { |
| 750 | const VkLayerDispatchTable *disp; |
| 751 | |
| 752 | disp = loader_get_dispatch(device); |
| 753 | |
Chia-I Wu | 8cd8ecd | 2015-05-25 16:27:55 +0800 | [diff] [blame] | 754 | return disp->UpdateDescriptorSets(device, writeCount, pDescriptorWrites, copyCount, pDescriptorCopies); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 755 | } |
| 756 | |
| 757 | LOADER_EXPORT VkResult VKAPI vkCreateDynamicViewportState(VkDevice device, const VkDynamicVpStateCreateInfo* pCreateInfo, VkDynamicVpState* pState) |
| 758 | { |
| 759 | const VkLayerDispatchTable *disp; |
| 760 | |
| 761 | disp = loader_get_dispatch(device); |
| 762 | |
| 763 | return disp->CreateDynamicViewportState(device, pCreateInfo, pState); |
| 764 | } |
| 765 | |
| 766 | LOADER_EXPORT VkResult VKAPI vkCreateDynamicRasterState(VkDevice device, const VkDynamicRsStateCreateInfo* pCreateInfo, VkDynamicRsState* pState) |
| 767 | { |
| 768 | const VkLayerDispatchTable *disp; |
| 769 | |
| 770 | disp = loader_get_dispatch(device); |
| 771 | |
| 772 | return disp->CreateDynamicRasterState(device, pCreateInfo, pState); |
| 773 | } |
| 774 | |
| 775 | LOADER_EXPORT VkResult VKAPI vkCreateDynamicColorBlendState(VkDevice device, const VkDynamicCbStateCreateInfo* pCreateInfo, VkDynamicCbState* pState) |
| 776 | { |
| 777 | const VkLayerDispatchTable *disp; |
| 778 | |
| 779 | disp = loader_get_dispatch(device); |
| 780 | |
| 781 | return disp->CreateDynamicColorBlendState(device, pCreateInfo, pState); |
| 782 | } |
| 783 | |
| 784 | LOADER_EXPORT VkResult VKAPI vkCreateDynamicDepthStencilState(VkDevice device, const VkDynamicDsStateCreateInfo* pCreateInfo, VkDynamicDsState* pState) |
| 785 | { |
| 786 | const VkLayerDispatchTable *disp; |
| 787 | |
| 788 | disp = loader_get_dispatch(device); |
| 789 | |
| 790 | return disp->CreateDynamicDepthStencilState(device, pCreateInfo, pState); |
| 791 | } |
| 792 | |
| 793 | LOADER_EXPORT VkResult VKAPI vkCreateCommandBuffer(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer) |
| 794 | { |
| 795 | const VkLayerDispatchTable *disp; |
| 796 | VkResult res; |
| 797 | |
| 798 | disp = loader_get_dispatch(device); |
| 799 | |
| 800 | res = disp->CreateCommandBuffer(device, pCreateInfo, pCmdBuffer); |
| 801 | if (res == VK_SUCCESS) { |
| 802 | loader_init_dispatch(*pCmdBuffer, disp); |
| 803 | } |
| 804 | |
| 805 | return res; |
| 806 | } |
| 807 | |
| 808 | LOADER_EXPORT VkResult VKAPI vkBeginCommandBuffer(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo) |
| 809 | { |
| 810 | const VkLayerDispatchTable *disp; |
| 811 | |
| 812 | disp = loader_get_dispatch(cmdBuffer); |
| 813 | |
| 814 | return disp->BeginCommandBuffer(cmdBuffer, pBeginInfo); |
| 815 | } |
| 816 | |
| 817 | LOADER_EXPORT VkResult VKAPI vkEndCommandBuffer(VkCmdBuffer cmdBuffer) |
| 818 | { |
| 819 | const VkLayerDispatchTable *disp; |
| 820 | |
| 821 | disp = loader_get_dispatch(cmdBuffer); |
| 822 | |
| 823 | return disp->EndCommandBuffer(cmdBuffer); |
| 824 | } |
| 825 | |
| 826 | LOADER_EXPORT VkResult VKAPI vkResetCommandBuffer(VkCmdBuffer cmdBuffer) |
| 827 | { |
| 828 | const VkLayerDispatchTable *disp; |
| 829 | |
| 830 | disp = loader_get_dispatch(cmdBuffer); |
| 831 | |
| 832 | return disp->ResetCommandBuffer(cmdBuffer); |
| 833 | } |
| 834 | |
| 835 | LOADER_EXPORT void VKAPI vkCmdBindPipeline(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) |
| 836 | { |
| 837 | const VkLayerDispatchTable *disp; |
| 838 | |
| 839 | disp = loader_get_dispatch(cmdBuffer); |
| 840 | |
| 841 | disp->CmdBindPipeline(cmdBuffer, pipelineBindPoint, pipeline); |
| 842 | } |
| 843 | |
| 844 | LOADER_EXPORT void VKAPI vkCmdBindDynamicStateObject(VkCmdBuffer cmdBuffer, VkStateBindPoint stateBindPoint, VkDynamicStateObject state) |
| 845 | { |
| 846 | const VkLayerDispatchTable *disp; |
| 847 | |
| 848 | disp = loader_get_dispatch(cmdBuffer); |
| 849 | |
| 850 | disp->CmdBindDynamicStateObject(cmdBuffer, stateBindPoint, state); |
| 851 | } |
| 852 | |
| 853 | LOADER_EXPORT void VKAPI vkCmdBindDescriptorSets(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) |
| 854 | { |
| 855 | const VkLayerDispatchTable *disp; |
| 856 | |
| 857 | disp = loader_get_dispatch(cmdBuffer); |
| 858 | |
| 859 | disp->CmdBindDescriptorSets(cmdBuffer, pipelineBindPoint, firstSet, setCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets); |
| 860 | } |
| 861 | |
| 862 | LOADER_EXPORT void VKAPI vkCmdBindVertexBuffers(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) |
| 863 | { |
| 864 | const VkLayerDispatchTable *disp; |
| 865 | |
| 866 | disp = loader_get_dispatch(cmdBuffer); |
| 867 | |
| 868 | disp->CmdBindVertexBuffers(cmdBuffer, startBinding, bindingCount, pBuffers, pOffsets); |
| 869 | } |
| 870 | |
| 871 | LOADER_EXPORT void VKAPI vkCmdBindIndexBuffer(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) |
| 872 | { |
| 873 | const VkLayerDispatchTable *disp; |
| 874 | |
| 875 | disp = loader_get_dispatch(cmdBuffer); |
| 876 | |
| 877 | disp->CmdBindIndexBuffer(cmdBuffer, buffer, offset, indexType); |
| 878 | } |
| 879 | |
| 880 | LOADER_EXPORT void VKAPI vkCmdDraw(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount) |
| 881 | { |
| 882 | const VkLayerDispatchTable *disp; |
| 883 | |
| 884 | disp = loader_get_dispatch(cmdBuffer); |
| 885 | |
| 886 | disp->CmdDraw(cmdBuffer, firstVertex, vertexCount, firstInstance, instanceCount); |
| 887 | } |
| 888 | |
| 889 | LOADER_EXPORT void VKAPI vkCmdDrawIndexed(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount) |
| 890 | { |
| 891 | const VkLayerDispatchTable *disp; |
| 892 | |
| 893 | disp = loader_get_dispatch(cmdBuffer); |
| 894 | |
| 895 | disp->CmdDrawIndexed(cmdBuffer, firstIndex, indexCount, vertexOffset, firstInstance, instanceCount); |
| 896 | } |
| 897 | |
| 898 | LOADER_EXPORT void VKAPI vkCmdDrawIndirect(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride) |
| 899 | { |
| 900 | const VkLayerDispatchTable *disp; |
| 901 | |
| 902 | disp = loader_get_dispatch(cmdBuffer); |
| 903 | |
| 904 | disp->CmdDrawIndirect(cmdBuffer, buffer, offset, count, stride); |
| 905 | } |
| 906 | |
| 907 | LOADER_EXPORT void VKAPI vkCmdDrawIndexedIndirect(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride) |
| 908 | { |
| 909 | const VkLayerDispatchTable *disp; |
| 910 | |
| 911 | disp = loader_get_dispatch(cmdBuffer); |
| 912 | |
| 913 | disp->CmdDrawIndexedIndirect(cmdBuffer, buffer, offset, count, stride); |
| 914 | } |
| 915 | |
| 916 | LOADER_EXPORT void VKAPI vkCmdDispatch(VkCmdBuffer cmdBuffer, uint32_t x, uint32_t y, uint32_t z) |
| 917 | { |
| 918 | const VkLayerDispatchTable *disp; |
| 919 | |
| 920 | disp = loader_get_dispatch(cmdBuffer); |
| 921 | |
| 922 | disp->CmdDispatch(cmdBuffer, x, y, z); |
| 923 | } |
| 924 | |
| 925 | LOADER_EXPORT void VKAPI vkCmdDispatchIndirect(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset) |
| 926 | { |
| 927 | const VkLayerDispatchTable *disp; |
| 928 | |
| 929 | disp = loader_get_dispatch(cmdBuffer); |
| 930 | |
| 931 | disp->CmdDispatchIndirect(cmdBuffer, buffer, offset); |
| 932 | } |
| 933 | |
| 934 | LOADER_EXPORT void VKAPI vkCmdCopyBuffer(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkBuffer destBuffer, uint32_t regionCount, const VkBufferCopy* pRegions) |
| 935 | { |
| 936 | const VkLayerDispatchTable *disp; |
| 937 | |
| 938 | disp = loader_get_dispatch(cmdBuffer); |
| 939 | |
| 940 | disp->CmdCopyBuffer(cmdBuffer, srcBuffer, destBuffer, regionCount, pRegions); |
| 941 | } |
| 942 | |
| 943 | LOADER_EXPORT void VKAPI vkCmdCopyImage(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageCopy* pRegions) |
| 944 | { |
| 945 | const VkLayerDispatchTable *disp; |
| 946 | |
| 947 | disp = loader_get_dispatch(cmdBuffer); |
| 948 | |
| 949 | disp->CmdCopyImage(cmdBuffer, srcImage, srcImageLayout, destImage, destImageLayout, regionCount, pRegions); |
| 950 | } |
| 951 | |
Mark Lobodzinski | 20f6859 | 2015-05-22 14:43:25 -0500 | [diff] [blame] | 952 | LOADER_EXPORT void VKAPI vkCmdBlitImage(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkTexFilter filter) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 953 | { |
| 954 | const VkLayerDispatchTable *disp; |
| 955 | |
| 956 | disp = loader_get_dispatch(cmdBuffer); |
| 957 | |
Mark Lobodzinski | 20f6859 | 2015-05-22 14:43:25 -0500 | [diff] [blame] | 958 | disp->CmdBlitImage(cmdBuffer, srcImage, srcImageLayout, destImage, destImageLayout, regionCount, pRegions, filter); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 959 | } |
| 960 | |
| 961 | LOADER_EXPORT void VKAPI vkCmdCopyBufferToImage(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions) |
| 962 | { |
| 963 | const VkLayerDispatchTable *disp; |
| 964 | |
| 965 | disp = loader_get_dispatch(cmdBuffer); |
| 966 | |
| 967 | disp->CmdCopyBufferToImage(cmdBuffer, srcBuffer, destImage, destImageLayout, regionCount, pRegions); |
| 968 | } |
| 969 | |
| 970 | LOADER_EXPORT void VKAPI vkCmdCopyImageToBuffer(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer destBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) |
| 971 | { |
| 972 | const VkLayerDispatchTable *disp; |
| 973 | |
| 974 | disp = loader_get_dispatch(cmdBuffer); |
| 975 | |
| 976 | disp->CmdCopyImageToBuffer(cmdBuffer, srcImage, srcImageLayout, destBuffer, regionCount, pRegions); |
| 977 | } |
| 978 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 979 | LOADER_EXPORT void VKAPI vkCmdUpdateBuffer(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize dataSize, const uint32_t* pData) |
| 980 | { |
| 981 | const VkLayerDispatchTable *disp; |
| 982 | |
| 983 | disp = loader_get_dispatch(cmdBuffer); |
| 984 | |
| 985 | disp->CmdUpdateBuffer(cmdBuffer, destBuffer, destOffset, dataSize, pData); |
| 986 | } |
| 987 | |
| 988 | LOADER_EXPORT void VKAPI vkCmdFillBuffer(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data) |
| 989 | { |
| 990 | const VkLayerDispatchTable *disp; |
| 991 | |
| 992 | disp = loader_get_dispatch(cmdBuffer); |
| 993 | |
| 994 | disp->CmdFillBuffer(cmdBuffer, destBuffer, destOffset, fillSize, data); |
| 995 | } |
| 996 | |
| 997 | LOADER_EXPORT void VKAPI vkCmdClearColorImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColor* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) |
| 998 | { |
| 999 | const VkLayerDispatchTable *disp; |
| 1000 | |
| 1001 | disp = loader_get_dispatch(cmdBuffer); |
| 1002 | |
| 1003 | disp->CmdClearColorImage(cmdBuffer, image, imageLayout, pColor, rangeCount, pRanges); |
| 1004 | } |
| 1005 | |
| 1006 | LOADER_EXPORT void VKAPI vkCmdClearDepthStencil(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) |
| 1007 | { |
| 1008 | const VkLayerDispatchTable *disp; |
| 1009 | |
| 1010 | disp = loader_get_dispatch(cmdBuffer); |
| 1011 | |
| 1012 | disp->CmdClearDepthStencil(cmdBuffer, image, imageLayout, depth, stencil, rangeCount, pRanges); |
| 1013 | } |
| 1014 | |
| 1015 | LOADER_EXPORT void VKAPI vkCmdResolveImage(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) |
| 1016 | { |
| 1017 | const VkLayerDispatchTable *disp; |
| 1018 | |
| 1019 | disp = loader_get_dispatch(cmdBuffer); |
| 1020 | |
| 1021 | disp->CmdResolveImage(cmdBuffer, srcImage, srcImageLayout, destImage, destImageLayout, regionCount, pRegions); |
| 1022 | } |
| 1023 | |
| 1024 | LOADER_EXPORT void VKAPI vkCmdSetEvent(VkCmdBuffer cmdBuffer, VkEvent event, VkPipeEvent pipeEvent) |
| 1025 | { |
| 1026 | const VkLayerDispatchTable *disp; |
| 1027 | |
| 1028 | disp = loader_get_dispatch(cmdBuffer); |
| 1029 | |
| 1030 | disp->CmdSetEvent(cmdBuffer, event, pipeEvent); |
| 1031 | } |
| 1032 | |
| 1033 | LOADER_EXPORT void VKAPI vkCmdResetEvent(VkCmdBuffer cmdBuffer, VkEvent event, VkPipeEvent pipeEvent) |
| 1034 | { |
| 1035 | const VkLayerDispatchTable *disp; |
| 1036 | |
| 1037 | disp = loader_get_dispatch(cmdBuffer); |
| 1038 | |
| 1039 | disp->CmdResetEvent(cmdBuffer, event, pipeEvent); |
| 1040 | } |
| 1041 | |
| 1042 | LOADER_EXPORT void VKAPI vkCmdWaitEvents(VkCmdBuffer cmdBuffer, VkWaitEvent waitEvent, uint32_t eventCount, const VkEvent* pEvents, uint32_t memBarrierCount, const void** ppMemBarriers) |
| 1043 | { |
| 1044 | const VkLayerDispatchTable *disp; |
| 1045 | |
| 1046 | disp = loader_get_dispatch(cmdBuffer); |
| 1047 | |
| 1048 | disp->CmdWaitEvents(cmdBuffer, waitEvent, eventCount, pEvents, memBarrierCount, ppMemBarriers); |
| 1049 | } |
| 1050 | |
| 1051 | LOADER_EXPORT void VKAPI vkCmdPipelineBarrier(VkCmdBuffer cmdBuffer, VkWaitEvent waitEvent, uint32_t pipeEventCount, const VkPipeEvent* pPipeEvents, uint32_t memBarrierCount, const void** ppMemBarriers) |
| 1052 | { |
| 1053 | const VkLayerDispatchTable *disp; |
| 1054 | |
| 1055 | disp = loader_get_dispatch(cmdBuffer); |
| 1056 | |
| 1057 | disp->CmdPipelineBarrier(cmdBuffer, waitEvent, pipeEventCount, pPipeEvents, memBarrierCount, ppMemBarriers); |
| 1058 | } |
| 1059 | |
| 1060 | LOADER_EXPORT void VKAPI vkCmdBeginQuery(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot, VkFlags flags) |
| 1061 | { |
| 1062 | const VkLayerDispatchTable *disp; |
| 1063 | |
| 1064 | disp = loader_get_dispatch(cmdBuffer); |
| 1065 | |
| 1066 | disp->CmdBeginQuery(cmdBuffer, queryPool, slot, flags); |
| 1067 | } |
| 1068 | |
| 1069 | LOADER_EXPORT void VKAPI vkCmdEndQuery(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot) |
| 1070 | { |
| 1071 | const VkLayerDispatchTable *disp; |
| 1072 | |
| 1073 | disp = loader_get_dispatch(cmdBuffer); |
| 1074 | |
| 1075 | disp->CmdEndQuery(cmdBuffer, queryPool, slot); |
| 1076 | } |
| 1077 | |
| 1078 | LOADER_EXPORT void VKAPI vkCmdResetQueryPool(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount) |
| 1079 | { |
| 1080 | const VkLayerDispatchTable *disp; |
| 1081 | |
| 1082 | disp = loader_get_dispatch(cmdBuffer); |
| 1083 | |
| 1084 | disp->CmdResetQueryPool(cmdBuffer, queryPool, startQuery, queryCount); |
| 1085 | } |
| 1086 | |
| 1087 | LOADER_EXPORT void VKAPI vkCmdWriteTimestamp(VkCmdBuffer cmdBuffer, VkTimestampType timestampType, VkBuffer destBuffer, VkDeviceSize destOffset) |
| 1088 | { |
| 1089 | const VkLayerDispatchTable *disp; |
| 1090 | |
| 1091 | disp = loader_get_dispatch(cmdBuffer); |
| 1092 | |
| 1093 | disp->CmdWriteTimestamp(cmdBuffer, timestampType, destBuffer, destOffset); |
| 1094 | } |
| 1095 | |
| 1096 | LOADER_EXPORT void VKAPI vkCmdCopyQueryPoolResults(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize destStride, VkFlags flags) |
| 1097 | { |
| 1098 | const VkLayerDispatchTable *disp; |
| 1099 | |
| 1100 | disp = loader_get_dispatch(cmdBuffer); |
| 1101 | |
| 1102 | disp->CmdCopyQueryPoolResults(cmdBuffer, queryPool, startQuery, queryCount, destBuffer, destOffset, destStride, flags); |
| 1103 | } |
| 1104 | |
| 1105 | LOADER_EXPORT void VKAPI vkCmdInitAtomicCounters(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, const uint32_t* pData) |
| 1106 | { |
| 1107 | const VkLayerDispatchTable *disp; |
| 1108 | |
| 1109 | disp = loader_get_dispatch(cmdBuffer); |
| 1110 | |
| 1111 | disp->CmdInitAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, pData); |
| 1112 | } |
| 1113 | |
| 1114 | LOADER_EXPORT void VKAPI vkCmdLoadAtomicCounters(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, VkBuffer srcBuffer, VkDeviceSize srcOffset) |
| 1115 | { |
| 1116 | const VkLayerDispatchTable *disp; |
| 1117 | |
| 1118 | disp = loader_get_dispatch(cmdBuffer); |
| 1119 | |
| 1120 | disp->CmdLoadAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, srcBuffer, srcOffset); |
| 1121 | } |
| 1122 | |
| 1123 | LOADER_EXPORT void VKAPI vkCmdSaveAtomicCounters(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t startCounter, uint32_t counterCount, VkBuffer destBuffer, VkDeviceSize destOffset) |
| 1124 | { |
| 1125 | const VkLayerDispatchTable *disp; |
| 1126 | |
| 1127 | disp = loader_get_dispatch(cmdBuffer); |
| 1128 | |
| 1129 | disp->CmdSaveAtomicCounters(cmdBuffer, pipelineBindPoint, startCounter, counterCount, destBuffer, destOffset); |
| 1130 | } |
| 1131 | |
| 1132 | LOADER_EXPORT VkResult VKAPI vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer) |
| 1133 | { |
| 1134 | const VkLayerDispatchTable *disp; |
| 1135 | |
| 1136 | disp = loader_get_dispatch(device); |
| 1137 | |
| 1138 | return disp->CreateFramebuffer(device, pCreateInfo, pFramebuffer); |
| 1139 | } |
| 1140 | |
| 1141 | LOADER_EXPORT VkResult VKAPI vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass) |
| 1142 | { |
| 1143 | const VkLayerDispatchTable *disp; |
| 1144 | |
| 1145 | disp = loader_get_dispatch(device); |
| 1146 | |
| 1147 | return disp->CreateRenderPass(device, pCreateInfo, pRenderPass); |
| 1148 | } |
| 1149 | |
| 1150 | LOADER_EXPORT void VKAPI vkCmdBeginRenderPass(VkCmdBuffer cmdBuffer, const VkRenderPassBegin* pRenderPassBegin) |
| 1151 | { |
| 1152 | const VkLayerDispatchTable *disp; |
| 1153 | |
| 1154 | disp = loader_get_dispatch(cmdBuffer); |
| 1155 | |
| 1156 | disp->CmdBeginRenderPass(cmdBuffer, pRenderPassBegin); |
| 1157 | } |
| 1158 | |
| 1159 | LOADER_EXPORT void VKAPI vkCmdEndRenderPass(VkCmdBuffer cmdBuffer, VkRenderPass renderPass) |
| 1160 | { |
| 1161 | const VkLayerDispatchTable *disp; |
| 1162 | |
| 1163 | disp = loader_get_dispatch(cmdBuffer); |
| 1164 | |
| 1165 | disp->CmdEndRenderPass(cmdBuffer, renderPass); |
| 1166 | } |