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 | */ |
Courtney Goeltzenleuchter | b620ace | 2015-07-05 11:28:29 -0600 | [diff] [blame] | 24 | #define _GNU_SOURCE |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 25 | #include <stdlib.h> |
| 26 | #include <string.h> |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 27 | |
Tobin Ehlis | 7a51d90 | 2015-07-03 10:34:49 -0600 | [diff] [blame] | 28 | #include "vk_loader_platform.h" |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 29 | #include "loader.h" |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 30 | #include "debug_report.h" |
Ian Elliott | 1d73e66 | 2015-07-06 14:36:13 -0600 | [diff] [blame^] | 31 | #include "wsi_swapchain.h" |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 32 | |
Tobin Ehlis | 3126f01 | 2015-05-13 11:57:18 -0600 | [diff] [blame] | 33 | #if defined(WIN32) |
| 34 | // On Windows need to disable global optimization for function entrypoints or |
| 35 | // else mhook will not be able to hook all of them |
| 36 | #pragma optimize( "g", off ) |
| 37 | #endif |
| 38 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 39 | /* Trampoline entrypoints */ |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 40 | LOADER_EXPORT VkResult VKAPI vkCreateInstance( |
Courtney Goeltzenleuchter | 70c4ebc | 2015-06-08 15:13:50 -0600 | [diff] [blame] | 41 | const VkInstanceCreateInfo* pCreateInfo, |
| 42 | VkInstance* pInstance) |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 43 | { |
| 44 | struct loader_instance *ptr_instance = NULL; |
| 45 | |
| 46 | VkResult res = VK_ERROR_INITIALIZATION_FAILED; |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 47 | |
| 48 | /* Scan/discover all ICD libraries in a single-threaded manner */ |
| 49 | loader_platform_thread_once(&once_icd, loader_icd_scan); |
| 50 | |
| 51 | /* get layer libraries in a single-threaded manner */ |
Jon Ashburn | 68a6392 | 2015-07-02 09:40:15 -0600 | [diff] [blame] | 52 | loader_platform_thread_once(&once_layer, loader_layer_scan); |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 53 | |
| 54 | /* merge any duplicate extensions */ |
| 55 | loader_platform_thread_once(&once_exts, loader_coalesce_extensions); |
| 56 | |
Courtney Goeltzenleuchter | a17697f | 2015-07-06 20:14:18 -0600 | [diff] [blame] | 57 | res = loader_validate_layers(pCreateInfo->layerCount, |
| 58 | pCreateInfo->ppEnabledLayerNames, |
Jon Ashburn | 1b111de | 2015-07-06 15:40:35 -0600 | [diff] [blame] | 59 | &loader.scanned_layers); |
Courtney Goeltzenleuchter | 5d9f29b | 2015-07-06 17:45:08 -0600 | [diff] [blame] | 60 | if (res != VK_SUCCESS) { |
| 61 | return res; |
| 62 | } |
| 63 | |
| 64 | res = loader_validate_instance_extensions(pCreateInfo); |
| 65 | if (res != VK_SUCCESS) { |
| 66 | return res; |
| 67 | } |
| 68 | |
Courtney Goeltzenleuchter | 1381cd1 | 2015-07-06 09:08:37 -0600 | [diff] [blame] | 69 | if (pCreateInfo->pAllocCb |
| 70 | && pCreateInfo->pAllocCb->pfnAlloc |
| 71 | && pCreateInfo->pAllocCb->pfnFree) { |
| 72 | ptr_instance = (struct loader_instance *) pCreateInfo->pAllocCb->pfnAlloc( |
| 73 | pCreateInfo->pAllocCb->pUserData, |
| 74 | sizeof(struct loader_instance), |
| 75 | sizeof(VkInstance), |
| 76 | VK_SYSTEM_ALLOC_TYPE_API_OBJECT); |
| 77 | } else { |
| 78 | ptr_instance = (struct loader_instance *) malloc(sizeof(struct loader_instance)); |
| 79 | } |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 80 | if (ptr_instance == NULL) { |
| 81 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
| 82 | } |
Courtney Goeltzenleuchter | 1381cd1 | 2015-07-06 09:08:37 -0600 | [diff] [blame] | 83 | |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 84 | memset(ptr_instance, 0, sizeof(struct loader_instance)); |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 85 | |
Courtney Goeltzenleuchter | 1381cd1 | 2015-07-06 09:08:37 -0600 | [diff] [blame] | 86 | loader_platform_thread_lock_mutex(&loader_lock); |
Jon Ashburn | cedc15f | 2015-05-21 18:13:33 -0600 | [diff] [blame] | 87 | |
Courtney Goeltzenleuchter | b620ace | 2015-07-05 11:28:29 -0600 | [diff] [blame] | 88 | if (pCreateInfo->pAllocCb |
| 89 | && pCreateInfo->pAllocCb->pfnAlloc |
| 90 | && pCreateInfo->pAllocCb->pfnFree) { |
| 91 | ptr_instance->alloc_callbacks.pUserData = pCreateInfo->pAllocCb->pUserData; |
| 92 | ptr_instance->alloc_callbacks.pfnAlloc = pCreateInfo->pAllocCb->pfnAlloc; |
| 93 | ptr_instance->alloc_callbacks.pfnFree = pCreateInfo->pAllocCb->pfnFree; |
| 94 | } |
| 95 | |
Courtney Goeltzenleuchter | 1381cd1 | 2015-07-06 09:08:37 -0600 | [diff] [blame] | 96 | ptr_instance->disp = loader_heap_alloc( |
| 97 | ptr_instance, |
| 98 | sizeof(VkLayerInstanceDispatchTable), |
| 99 | VK_SYSTEM_ALLOC_TYPE_INTERNAL); |
| 100 | if (ptr_instance->disp == NULL) { |
| 101 | loader_platform_thread_unlock_mutex(&loader_lock); |
| 102 | return VK_ERROR_OUT_OF_HOST_MEMORY; |
| 103 | } |
| 104 | memcpy(ptr_instance->disp, &instance_disp, sizeof(instance_disp)); |
| 105 | ptr_instance->next = loader.instances; |
| 106 | loader.instances = ptr_instance; |
| 107 | |
| 108 | res = loader_enable_instance_layers(ptr_instance, pCreateInfo); |
| 109 | if (res != VK_SUCCESS) { |
| 110 | loader_heap_free(ptr_instance, ptr_instance->disp); |
| 111 | loader_heap_free(ptr_instance, ptr_instance); |
| 112 | return res; |
| 113 | } |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 114 | |
Ian Elliott | 1d73e66 | 2015-07-06 14:36:13 -0600 | [diff] [blame^] | 115 | wsi_swapchain_create_instance(ptr_instance, pCreateInfo); |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 116 | debug_report_create_instance(ptr_instance, pCreateInfo); |
Jon Ashburn | cedc15f | 2015-05-21 18:13:33 -0600 | [diff] [blame] | 117 | |
| 118 | /* enable any layers on instance chain */ |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 119 | loader_activate_instance_layers(ptr_instance); |
| 120 | |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 121 | *pInstance = (VkInstance) ptr_instance; |
Jon Ashburn | a179dcf | 2015-05-21 17:42:17 -0600 | [diff] [blame] | 122 | |
| 123 | res = ptr_instance->disp->CreateInstance(pCreateInfo, pInstance); |
| 124 | |
Courtney Goeltzenleuchter | 23b5f8d | 2015-06-17 20:51:59 -0600 | [diff] [blame] | 125 | /* |
| 126 | * Finally have the layers in place and everyone has seen |
| 127 | * the CreateInstance command go by. This allows the layer's |
| 128 | * GetInstanceProcAddr functions to return valid extension functions |
| 129 | * if enabled. |
| 130 | */ |
| 131 | loader_activate_instance_layer_extensions(ptr_instance); |
| 132 | |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 133 | loader_platform_thread_unlock_mutex(&loader_lock); |
| 134 | |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 135 | return res; |
| 136 | } |
| 137 | |
| 138 | LOADER_EXPORT VkResult VKAPI vkDestroyInstance( |
| 139 | VkInstance instance) |
| 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); |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 144 | |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 145 | loader_platform_thread_lock_mutex(&loader_lock); |
| 146 | |
| 147 | res = disp->DestroyInstance(instance); |
Courtney Goeltzenleuchter | 1c7c65d | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 148 | |
Courtney Goeltzenleuchter | 3d8dc1f | 2015-06-08 15:09:22 -0600 | [diff] [blame] | 149 | struct loader_instance *ptr_instance = loader_instance(instance); |
| 150 | loader_deactivate_instance_layers(ptr_instance); |
Courtney Goeltzenleuchter | 3d8dc1f | 2015-06-08 15:09:22 -0600 | [diff] [blame] | 151 | |
| 152 | free(ptr_instance); |
| 153 | |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 154 | loader_platform_thread_unlock_mutex(&loader_lock); |
| 155 | |
Courtney Goeltzenleuchter | 3d8dc1f | 2015-06-08 15:09:22 -0600 | [diff] [blame] | 156 | return res; |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 157 | } |
Jon Ashburn | 2666e2f | 2015-05-15 15:09:35 -0600 | [diff] [blame] | 158 | |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 159 | LOADER_EXPORT VkResult VKAPI vkEnumeratePhysicalDevices( |
| 160 | VkInstance instance, |
| 161 | uint32_t* pPhysicalDeviceCount, |
| 162 | VkPhysicalDevice* pPhysicalDevices) |
| 163 | { |
| 164 | const VkLayerInstanceDispatchTable *disp; |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 165 | VkResult res; |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 166 | disp = loader_get_instance_dispatch(instance); |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 167 | |
| 168 | loader_platform_thread_lock_mutex(&loader_lock); |
| 169 | res = disp->EnumeratePhysicalDevices(instance, pPhysicalDeviceCount, |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 170 | pPhysicalDevices); |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 171 | loader_platform_thread_unlock_mutex(&loader_lock); |
| 172 | return res; |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 173 | } |
| 174 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 175 | LOADER_EXPORT VkResult VKAPI vkGetPhysicalDeviceProperties( |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 176 | VkPhysicalDevice gpu, |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 177 | VkPhysicalDeviceProperties* pProperties) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 178 | { |
Jon Ashburn | 2666e2f | 2015-05-15 15:09:35 -0600 | [diff] [blame] | 179 | const VkLayerInstanceDispatchTable *disp; |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 180 | VkResult res; |
| 181 | |
Jon Ashburn | 2666e2f | 2015-05-15 15:09:35 -0600 | [diff] [blame] | 182 | disp = loader_get_instance_dispatch(gpu); |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 183 | res = disp->GetPhysicalDeviceProperties(gpu, pProperties); |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 184 | return res; |
| 185 | } |
| 186 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 187 | LOADER_EXPORT VkResult VKAPI vkGetPhysicalDeviceQueueCount( |
| 188 | VkPhysicalDevice gpu, |
| 189 | uint32_t* pCount) |
| 190 | { |
| 191 | const VkLayerInstanceDispatchTable *disp; |
| 192 | VkResult res; |
| 193 | |
| 194 | disp = loader_get_instance_dispatch(gpu); |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 195 | res = disp->GetPhysicalDeviceQueueCount(gpu, pCount); |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 196 | return res; |
| 197 | } |
| 198 | |
| 199 | LOADER_EXPORT VkResult VKAPI vkGetPhysicalDeviceQueueProperties( |
| 200 | VkPhysicalDevice gpu, |
| 201 | uint32_t count, |
| 202 | VkPhysicalDeviceQueueProperties* pQueueProperties) |
| 203 | { |
| 204 | const VkLayerInstanceDispatchTable *disp; |
| 205 | VkResult res; |
| 206 | |
| 207 | disp = loader_get_instance_dispatch(gpu); |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 208 | res = disp->GetPhysicalDeviceQueueProperties(gpu, count, pQueueProperties); |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 209 | return res; |
| 210 | } |
| 211 | |
| 212 | LOADER_EXPORT VkResult VKAPI vkGetPhysicalDeviceMemoryProperties( |
| 213 | VkPhysicalDevice gpu, |
| 214 | VkPhysicalDeviceMemoryProperties* pMemoryProperties) |
| 215 | { |
| 216 | const VkLayerInstanceDispatchTable *disp; |
| 217 | VkResult res; |
| 218 | |
| 219 | disp = loader_get_instance_dispatch(gpu); |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 220 | res = disp->GetPhysicalDeviceMemoryProperties(gpu, pMemoryProperties); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 221 | return res; |
| 222 | } |
| 223 | |
Chris Forbes | d757630 | 2015-06-21 22:55:02 +1200 | [diff] [blame] | 224 | LOADER_EXPORT VkResult VKAPI vkGetPhysicalDeviceFeatures( |
| 225 | VkPhysicalDevice gpu, |
| 226 | VkPhysicalDeviceFeatures *pFeatures) |
| 227 | { |
| 228 | const VkLayerInstanceDispatchTable *disp; |
| 229 | VkResult res; |
| 230 | |
| 231 | disp = loader_get_instance_dispatch(gpu); |
Chris Forbes | d757630 | 2015-06-21 22:55:02 +1200 | [diff] [blame] | 232 | res = disp->GetPhysicalDeviceFeatures(gpu, pFeatures); |
Chris Forbes | d757630 | 2015-06-21 22:55:02 +1200 | [diff] [blame] | 233 | return res; |
| 234 | } |
| 235 | |
Courtney Goeltzenleuchter | 4da96aa | 2015-07-12 12:52:09 -0600 | [diff] [blame] | 236 | LOADER_EXPORT VkResult VKAPI vkGetPhysicalDeviceFormatProperties( |
Chris Forbes | d757630 | 2015-06-21 22:55:02 +1200 | [diff] [blame] | 237 | VkPhysicalDevice gpu, |
| 238 | VkFormat format, |
| 239 | VkFormatProperties *pFormatInfo) |
| 240 | { |
| 241 | const VkLayerInstanceDispatchTable *disp; |
| 242 | VkResult res; |
| 243 | |
| 244 | disp = loader_get_instance_dispatch(gpu); |
Courtney Goeltzenleuchter | 4da96aa | 2015-07-12 12:52:09 -0600 | [diff] [blame] | 245 | res = disp->GetPhysicalDeviceFormatProperties(gpu, format, pFormatInfo); |
Chris Forbes | d757630 | 2015-06-21 22:55:02 +1200 | [diff] [blame] | 246 | return res; |
| 247 | } |
| 248 | |
| 249 | LOADER_EXPORT VkResult VKAPI vkGetPhysicalDeviceLimits( |
| 250 | VkPhysicalDevice gpu, |
| 251 | VkPhysicalDeviceLimits *pLimits) |
| 252 | { |
| 253 | const VkLayerInstanceDispatchTable *disp; |
| 254 | VkResult res; |
| 255 | |
| 256 | disp = loader_get_instance_dispatch(gpu); |
Chris Forbes | d757630 | 2015-06-21 22:55:02 +1200 | [diff] [blame] | 257 | res = disp->GetPhysicalDeviceLimits(gpu, pLimits); |
Chris Forbes | d757630 | 2015-06-21 22:55:02 +1200 | [diff] [blame] | 258 | return res; |
| 259 | } |
| 260 | |
Jon Ashburn | 2666e2f | 2015-05-15 15:09:35 -0600 | [diff] [blame] | 261 | LOADER_EXPORT VkResult VKAPI vkCreateDevice( |
Courtney Goeltzenleuchter | be63799 | 2015-06-25 18:01:43 -0600 | [diff] [blame] | 262 | VkPhysicalDevice gpu, |
| 263 | const VkDeviceCreateInfo* pCreateInfo, |
| 264 | VkDevice* pDevice) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 265 | { |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 266 | VkResult res; |
| 267 | |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 268 | loader_platform_thread_lock_mutex(&loader_lock); |
Courtney Goeltzenleuchter | be63799 | 2015-06-25 18:01:43 -0600 | [diff] [blame] | 269 | |
| 270 | res = loader_CreateDevice(gpu, pCreateInfo, pDevice); |
| 271 | |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 272 | loader_platform_thread_unlock_mutex(&loader_lock); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 273 | return res; |
| 274 | } |
| 275 | |
| 276 | LOADER_EXPORT VkResult VKAPI vkDestroyDevice(VkDevice device) |
| 277 | { |
| 278 | const VkLayerDispatchTable *disp; |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 279 | VkResult res; |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 280 | |
| 281 | disp = loader_get_dispatch(device); |
| 282 | |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 283 | loader_platform_thread_lock_mutex(&loader_lock); |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 284 | res = disp->DestroyDevice(device); |
Jon Ashburn | cb5a5ac | 2015-06-10 10:06:06 -0600 | [diff] [blame] | 285 | loader_remove_logical_device(device); |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 286 | loader_platform_thread_unlock_mutex(&loader_lock); |
| 287 | return res; |
| 288 | } |
| 289 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 290 | LOADER_EXPORT VkResult VKAPI vkGetPhysicalDeviceExtensionProperties( |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 291 | VkPhysicalDevice physicalDevice, |
| 292 | const char* pLayerName, |
| 293 | uint32_t* pCount, |
| 294 | VkExtensionProperties* pProperties) |
Jon Ashburn | b40f256 | 2015-05-29 13:15:39 -0600 | [diff] [blame] | 295 | { |
| 296 | VkResult res; |
| 297 | |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 298 | loader_platform_thread_lock_mutex(&loader_lock); |
| 299 | res = loader_GetPhysicalDeviceExtensionProperties(physicalDevice, pLayerName, pCount, pProperties); |
| 300 | loader_platform_thread_unlock_mutex(&loader_lock); |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 301 | return res; |
| 302 | } |
| 303 | |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 304 | LOADER_EXPORT VkResult VKAPI vkGetPhysicalDeviceLayerProperties( |
| 305 | VkPhysicalDevice physicalDevice, |
| 306 | uint32_t* pCount, |
| 307 | VkLayerProperties* pProperties) |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 308 | { |
| 309 | VkResult res; |
| 310 | |
Courtney Goeltzenleuchter | 18061cd | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 311 | loader_platform_thread_lock_mutex(&loader_lock); |
| 312 | res = loader_GetPhysicalDeviceLayerProperties(physicalDevice, pCount, pProperties); |
| 313 | loader_platform_thread_unlock_mutex(&loader_lock); |
Jon Ashburn | fce93d9 | 2015-05-12 17:26:48 -0600 | [diff] [blame] | 314 | return res; |
| 315 | } |
| 316 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 317 | LOADER_EXPORT VkResult VKAPI vkGetDeviceQueue(VkDevice device, uint32_t queueNodeIndex, uint32_t queueIndex, VkQueue* pQueue) |
| 318 | { |
| 319 | const VkLayerDispatchTable *disp; |
| 320 | VkResult res; |
| 321 | |
| 322 | disp = loader_get_dispatch(device); |
| 323 | |
| 324 | res = disp->GetDeviceQueue(device, queueNodeIndex, queueIndex, pQueue); |
| 325 | if (res == VK_SUCCESS) { |
| 326 | loader_set_dispatch(*pQueue, disp); |
| 327 | } |
| 328 | |
| 329 | return res; |
| 330 | } |
| 331 | |
| 332 | LOADER_EXPORT VkResult VKAPI vkQueueSubmit(VkQueue queue, uint32_t cmdBufferCount, const VkCmdBuffer* pCmdBuffers, VkFence fence) |
| 333 | { |
| 334 | const VkLayerDispatchTable *disp; |
| 335 | |
| 336 | disp = loader_get_dispatch(queue); |
| 337 | |
| 338 | return disp->QueueSubmit(queue, cmdBufferCount, pCmdBuffers, fence); |
| 339 | } |
| 340 | |
| 341 | LOADER_EXPORT VkResult VKAPI vkQueueWaitIdle(VkQueue queue) |
| 342 | { |
| 343 | const VkLayerDispatchTable *disp; |
| 344 | |
| 345 | disp = loader_get_dispatch(queue); |
| 346 | |
| 347 | return disp->QueueWaitIdle(queue); |
| 348 | } |
| 349 | |
| 350 | LOADER_EXPORT VkResult VKAPI vkDeviceWaitIdle(VkDevice device) |
| 351 | { |
| 352 | const VkLayerDispatchTable *disp; |
| 353 | |
| 354 | disp = loader_get_dispatch(device); |
| 355 | |
| 356 | return disp->DeviceWaitIdle(device); |
| 357 | } |
| 358 | |
| 359 | LOADER_EXPORT VkResult VKAPI vkAllocMemory(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, VkDeviceMemory* pMem) |
| 360 | { |
| 361 | const VkLayerDispatchTable *disp; |
| 362 | |
| 363 | disp = loader_get_dispatch(device); |
| 364 | |
| 365 | return disp->AllocMemory(device, pAllocInfo, pMem); |
| 366 | } |
| 367 | |
| 368 | LOADER_EXPORT VkResult VKAPI vkFreeMemory(VkDevice device, VkDeviceMemory mem) |
| 369 | { |
| 370 | const VkLayerDispatchTable *disp; |
| 371 | |
| 372 | disp = loader_get_dispatch(device); |
| 373 | |
| 374 | return disp->FreeMemory(device, mem); |
| 375 | } |
| 376 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 377 | LOADER_EXPORT VkResult VKAPI vkMapMemory(VkDevice device, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size, VkFlags flags, void** ppData) |
| 378 | { |
| 379 | const VkLayerDispatchTable *disp; |
| 380 | |
| 381 | disp = loader_get_dispatch(device); |
| 382 | |
| 383 | return disp->MapMemory(device, mem, offset, size, flags, ppData); |
| 384 | } |
| 385 | |
| 386 | LOADER_EXPORT VkResult VKAPI vkUnmapMemory(VkDevice device, VkDeviceMemory mem) |
| 387 | { |
| 388 | const VkLayerDispatchTable *disp; |
| 389 | |
| 390 | disp = loader_get_dispatch(device); |
| 391 | |
| 392 | return disp->UnmapMemory(device, mem); |
| 393 | } |
| 394 | |
| 395 | LOADER_EXPORT VkResult VKAPI vkFlushMappedMemoryRanges(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges) |
| 396 | { |
| 397 | const VkLayerDispatchTable *disp; |
| 398 | |
| 399 | disp = loader_get_dispatch(device); |
| 400 | |
| 401 | return disp->FlushMappedMemoryRanges(device, memRangeCount, pMemRanges); |
| 402 | } |
| 403 | |
| 404 | LOADER_EXPORT VkResult VKAPI vkInvalidateMappedMemoryRanges(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges) |
| 405 | { |
| 406 | const VkLayerDispatchTable *disp; |
| 407 | |
| 408 | disp = loader_get_dispatch(device); |
| 409 | |
| 410 | return disp->InvalidateMappedMemoryRanges(device, memRangeCount, pMemRanges); |
| 411 | } |
| 412 | |
Courtney Goeltzenleuchter | d040c5c | 2015-07-09 21:57:28 -0600 | [diff] [blame] | 413 | LOADER_EXPORT VkResult VKAPI vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes) |
| 414 | { |
| 415 | const VkLayerDispatchTable *disp; |
| 416 | |
| 417 | disp = loader_get_dispatch(device); |
| 418 | |
| 419 | return disp->GetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes); |
| 420 | } |
| 421 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 422 | LOADER_EXPORT VkResult VKAPI vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 423 | { |
| 424 | const VkLayerDispatchTable *disp; |
| 425 | |
| 426 | disp = loader_get_dispatch(device); |
| 427 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 428 | return disp->GetBufferMemoryRequirements(device, buffer, pMemoryRequirements); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 429 | } |
| 430 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 431 | LOADER_EXPORT VkResult VKAPI vkGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 432 | { |
| 433 | const VkLayerDispatchTable *disp; |
| 434 | |
| 435 | disp = loader_get_dispatch(device); |
| 436 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 437 | return disp->GetImageMemoryRequirements(device, image, pMemoryRequirements); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 438 | } |
| 439 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 440 | LOADER_EXPORT VkResult VKAPI vkBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory mem, VkDeviceSize offset) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 441 | { |
| 442 | const VkLayerDispatchTable *disp; |
| 443 | |
Mark Lobodzinski | fb9f564 | 2015-05-11 17:21:15 -0500 | [diff] [blame] | 444 | disp = loader_get_dispatch(device); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 445 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 446 | return disp->BindBufferMemory(device, buffer, mem, offset); |
| 447 | } |
| 448 | |
| 449 | LOADER_EXPORT VkResult VKAPI vkBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory mem, VkDeviceSize offset) |
| 450 | { |
| 451 | const VkLayerDispatchTable *disp; |
| 452 | |
| 453 | disp = loader_get_dispatch(device); |
| 454 | |
| 455 | return disp->BindImageMemory(device, image, mem, offset); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 456 | } |
| 457 | |
Mark Lobodzinski | 83d4e6a | 2015-07-03 15:58:09 -0600 | [diff] [blame] | 458 | LOADER_EXPORT VkResult VKAPI vkGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pNumRequirements, VkSparseImageMemoryRequirements* pSparseMemoryRequirements) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 459 | { |
| 460 | const VkLayerDispatchTable *disp; |
| 461 | |
Mark Lobodzinski | 83d4e6a | 2015-07-03 15:58:09 -0600 | [diff] [blame] | 462 | disp = loader_get_dispatch(device); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 463 | |
Mark Lobodzinski | 83d4e6a | 2015-07-03 15:58:09 -0600 | [diff] [blame] | 464 | return disp->GetImageSparseMemoryRequirements(device, image, pNumRequirements, pSparseMemoryRequirements); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 465 | } |
| 466 | |
Mark Lobodzinski | 83d4e6a | 2015-07-03 15:58:09 -0600 | [diff] [blame] | 467 | LOADER_EXPORT VkResult VKAPI vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, uint32_t samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pNumProperties, VkSparseImageFormatProperties* pProperties) |
| 468 | { |
| 469 | const VkLayerInstanceDispatchTable *disp; |
| 470 | |
| 471 | disp = loader_get_instance_dispatch(physicalDevice); |
| 472 | |
| 473 | return disp->GetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, tiling, pNumProperties, pProperties); |
| 474 | } |
| 475 | |
| 476 | LOADER_EXPORT VkResult VKAPI vkQueueBindSparseImageOpaqueMemory(VkQueue queue, VkImage image, uint32_t numBindings, const VkSparseMemoryBindInfo* pBindInfo) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 477 | { |
| 478 | const VkLayerDispatchTable *disp; |
| 479 | |
| 480 | disp = loader_get_dispatch(queue); |
| 481 | |
Mark Lobodzinski | 83d4e6a | 2015-07-03 15:58:09 -0600 | [diff] [blame] | 482 | return disp->QueueBindSparseImageOpaqueMemory(queue, image, numBindings, pBindInfo); |
| 483 | } |
| 484 | |
| 485 | LOADER_EXPORT VkResult VKAPI vkQueueBindSparseBufferMemory(VkQueue queue, VkBuffer buffer, uint32_t numBindings, const VkSparseMemoryBindInfo* pBindInfo) |
| 486 | { |
| 487 | const VkLayerDispatchTable *disp; |
| 488 | |
| 489 | disp = loader_get_dispatch(queue); |
| 490 | |
| 491 | return disp->QueueBindSparseBufferMemory(queue, buffer, numBindings, pBindInfo); |
| 492 | } |
| 493 | |
| 494 | LOADER_EXPORT VkResult VKAPI vkQueueBindSparseImageMemory(VkQueue queue, VkImage image, uint32_t numBindings, const VkSparseImageMemoryBindInfo* pBindInfo) |
| 495 | { |
| 496 | const VkLayerDispatchTable *disp; |
| 497 | |
| 498 | disp = loader_get_dispatch(queue); |
| 499 | |
| 500 | return disp->QueueBindSparseImageMemory(queue, image, numBindings, pBindInfo); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 501 | } |
| 502 | |
| 503 | LOADER_EXPORT VkResult VKAPI vkCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence) |
| 504 | { |
| 505 | const VkLayerDispatchTable *disp; |
| 506 | |
| 507 | disp = loader_get_dispatch(device); |
| 508 | |
| 509 | return disp->CreateFence(device, pCreateInfo, pFence); |
| 510 | } |
| 511 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 512 | LOADER_EXPORT VkResult VKAPI vkDestroyFence(VkDevice device, VkFence fence) |
| 513 | { |
| 514 | const VkLayerDispatchTable *disp; |
| 515 | |
| 516 | disp = loader_get_dispatch(device); |
| 517 | |
| 518 | return disp->DestroyFence(device, fence); |
| 519 | } |
| 520 | |
Courtney Goeltzenleuchter | f2e33ad | 2015-06-18 17:28:20 -0600 | [diff] [blame] | 521 | LOADER_EXPORT VkResult VKAPI vkResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 522 | { |
| 523 | const VkLayerDispatchTable *disp; |
| 524 | |
| 525 | disp = loader_get_dispatch(device); |
| 526 | |
| 527 | return disp->ResetFences(device, fenceCount, pFences); |
| 528 | } |
| 529 | |
| 530 | LOADER_EXPORT VkResult VKAPI vkGetFenceStatus(VkDevice device, VkFence fence) |
| 531 | { |
| 532 | const VkLayerDispatchTable *disp; |
| 533 | |
| 534 | disp = loader_get_dispatch(device); |
| 535 | |
| 536 | return disp->GetFenceStatus(device, fence); |
| 537 | } |
| 538 | |
Courtney Goeltzenleuchter | 1f41f54 | 2015-07-09 11:44:38 -0600 | [diff] [blame] | 539 | LOADER_EXPORT VkResult VKAPI vkWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 540 | { |
| 541 | const VkLayerDispatchTable *disp; |
| 542 | |
| 543 | disp = loader_get_dispatch(device); |
| 544 | |
| 545 | return disp->WaitForFences(device, fenceCount, pFences, waitAll, timeout); |
| 546 | } |
| 547 | |
| 548 | LOADER_EXPORT VkResult VKAPI vkCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, VkSemaphore* pSemaphore) |
| 549 | { |
| 550 | const VkLayerDispatchTable *disp; |
| 551 | |
| 552 | disp = loader_get_dispatch(device); |
| 553 | |
| 554 | return disp->CreateSemaphore(device, pCreateInfo, pSemaphore); |
| 555 | } |
| 556 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 557 | LOADER_EXPORT VkResult VKAPI vkDestroySemaphore(VkDevice device, VkSemaphore semaphore) |
| 558 | { |
| 559 | const VkLayerDispatchTable *disp; |
| 560 | |
| 561 | disp = loader_get_dispatch(device); |
| 562 | |
| 563 | return disp->DestroySemaphore(device, semaphore); |
| 564 | } |
| 565 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 566 | LOADER_EXPORT VkResult VKAPI vkQueueSignalSemaphore(VkQueue queue, VkSemaphore semaphore) |
| 567 | { |
| 568 | const VkLayerDispatchTable *disp; |
| 569 | |
| 570 | disp = loader_get_dispatch(queue); |
| 571 | |
| 572 | return disp->QueueSignalSemaphore(queue, semaphore); |
| 573 | } |
| 574 | |
| 575 | LOADER_EXPORT VkResult VKAPI vkQueueWaitSemaphore(VkQueue queue, VkSemaphore semaphore) |
| 576 | { |
| 577 | const VkLayerDispatchTable *disp; |
| 578 | |
| 579 | disp = loader_get_dispatch(queue); |
| 580 | |
| 581 | return disp->QueueWaitSemaphore(queue, semaphore); |
| 582 | } |
| 583 | |
| 584 | LOADER_EXPORT VkResult VKAPI vkCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, VkEvent* pEvent) |
| 585 | { |
| 586 | const VkLayerDispatchTable *disp; |
| 587 | |
| 588 | disp = loader_get_dispatch(device); |
| 589 | |
| 590 | return disp->CreateEvent(device, pCreateInfo, pEvent); |
| 591 | } |
| 592 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 593 | LOADER_EXPORT VkResult VKAPI vkDestroyEvent(VkDevice device, VkEvent event) |
| 594 | { |
| 595 | const VkLayerDispatchTable *disp; |
| 596 | |
| 597 | disp = loader_get_dispatch(device); |
| 598 | |
| 599 | return disp->DestroyEvent(device, event); |
| 600 | } |
| 601 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 602 | LOADER_EXPORT VkResult VKAPI vkGetEventStatus(VkDevice device, VkEvent event) |
| 603 | { |
| 604 | const VkLayerDispatchTable *disp; |
| 605 | |
| 606 | disp = loader_get_dispatch(device); |
| 607 | |
| 608 | return disp->GetEventStatus(device, event); |
| 609 | } |
| 610 | |
| 611 | LOADER_EXPORT VkResult VKAPI vkSetEvent(VkDevice device, VkEvent event) |
| 612 | { |
| 613 | const VkLayerDispatchTable *disp; |
| 614 | |
| 615 | disp = loader_get_dispatch(device); |
| 616 | |
| 617 | return disp->SetEvent(device, event); |
| 618 | } |
| 619 | |
| 620 | LOADER_EXPORT VkResult VKAPI vkResetEvent(VkDevice device, VkEvent event) |
| 621 | { |
| 622 | const VkLayerDispatchTable *disp; |
| 623 | |
| 624 | disp = loader_get_dispatch(device); |
| 625 | |
| 626 | return disp->ResetEvent(device, event); |
| 627 | } |
| 628 | |
| 629 | LOADER_EXPORT VkResult VKAPI vkCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, VkQueryPool* pQueryPool) |
| 630 | { |
| 631 | const VkLayerDispatchTable *disp; |
| 632 | |
| 633 | disp = loader_get_dispatch(device); |
| 634 | |
| 635 | return disp->CreateQueryPool(device, pCreateInfo, pQueryPool); |
| 636 | } |
| 637 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 638 | LOADER_EXPORT VkResult VKAPI vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool) |
| 639 | { |
| 640 | const VkLayerDispatchTable *disp; |
| 641 | |
| 642 | disp = loader_get_dispatch(device); |
| 643 | |
| 644 | return disp->DestroyQueryPool(device, queryPool); |
| 645 | } |
| 646 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 647 | LOADER_EXPORT VkResult VKAPI vkGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData, VkQueryResultFlags flags) |
| 648 | { |
| 649 | const VkLayerDispatchTable *disp; |
| 650 | |
| 651 | disp = loader_get_dispatch(device); |
| 652 | |
| 653 | return disp->GetQueryPoolResults(device, queryPool, startQuery, queryCount, pDataSize, pData, flags); |
| 654 | } |
| 655 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 656 | LOADER_EXPORT VkResult VKAPI vkCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer) |
| 657 | { |
| 658 | const VkLayerDispatchTable *disp; |
| 659 | |
| 660 | disp = loader_get_dispatch(device); |
| 661 | |
| 662 | return disp->CreateBuffer(device, pCreateInfo, pBuffer); |
| 663 | } |
| 664 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 665 | LOADER_EXPORT VkResult VKAPI vkDestroyBuffer(VkDevice device, VkBuffer buffer) |
| 666 | { |
| 667 | const VkLayerDispatchTable *disp; |
| 668 | |
| 669 | disp = loader_get_dispatch(device); |
| 670 | |
| 671 | return disp->DestroyBuffer(device, buffer); |
| 672 | } |
| 673 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 674 | LOADER_EXPORT VkResult VKAPI vkCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView) |
| 675 | { |
| 676 | const VkLayerDispatchTable *disp; |
| 677 | |
| 678 | disp = loader_get_dispatch(device); |
| 679 | |
| 680 | return disp->CreateBufferView(device, pCreateInfo, pView); |
| 681 | } |
| 682 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 683 | LOADER_EXPORT VkResult VKAPI vkDestroyBufferView(VkDevice device, VkBufferView bufferView) |
| 684 | { |
| 685 | const VkLayerDispatchTable *disp; |
| 686 | |
| 687 | disp = loader_get_dispatch(device); |
| 688 | |
| 689 | return disp->DestroyBufferView(device, bufferView); |
| 690 | } |
| 691 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 692 | LOADER_EXPORT VkResult VKAPI vkCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, VkImage* pImage) |
| 693 | { |
| 694 | const VkLayerDispatchTable *disp; |
| 695 | |
| 696 | disp = loader_get_dispatch(device); |
| 697 | |
| 698 | return disp->CreateImage(device, pCreateInfo, pImage); |
| 699 | } |
| 700 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 701 | LOADER_EXPORT VkResult VKAPI vkDestroyImage(VkDevice device, VkImage image) |
| 702 | { |
| 703 | const VkLayerDispatchTable *disp; |
| 704 | |
| 705 | disp = loader_get_dispatch(device); |
| 706 | |
| 707 | return disp->DestroyImage(device, image); |
| 708 | } |
| 709 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 710 | LOADER_EXPORT VkResult VKAPI vkGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 711 | { |
| 712 | const VkLayerDispatchTable *disp; |
| 713 | |
| 714 | disp = loader_get_dispatch(device); |
| 715 | |
Tony Barbour | 426b905 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 716 | return disp->GetImageSubresourceLayout(device, image, pSubresource, pLayout); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 717 | } |
| 718 | |
| 719 | LOADER_EXPORT VkResult VKAPI vkCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView) |
| 720 | { |
| 721 | const VkLayerDispatchTable *disp; |
| 722 | |
| 723 | disp = loader_get_dispatch(device); |
| 724 | |
| 725 | return disp->CreateImageView(device, pCreateInfo, pView); |
| 726 | } |
| 727 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 728 | LOADER_EXPORT VkResult VKAPI vkDestroyImageView(VkDevice device, VkImageView imageView) |
| 729 | { |
| 730 | const VkLayerDispatchTable *disp; |
| 731 | |
| 732 | disp = loader_get_dispatch(device); |
| 733 | |
| 734 | return disp->DestroyImageView(device, imageView); |
| 735 | } |
| 736 | |
Chia-I Wu | c278df8 | 2015-07-07 11:50:03 +0800 | [diff] [blame] | 737 | LOADER_EXPORT VkResult VKAPI vkCreateAttachmentView(VkDevice device, const VkAttachmentViewCreateInfo* pCreateInfo, VkAttachmentView* pView) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 738 | { |
| 739 | const VkLayerDispatchTable *disp; |
| 740 | |
| 741 | disp = loader_get_dispatch(device); |
| 742 | |
Chia-I Wu | c278df8 | 2015-07-07 11:50:03 +0800 | [diff] [blame] | 743 | return disp->CreateAttachmentView(device, pCreateInfo, pView); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 744 | } |
| 745 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 746 | LOADER_EXPORT VkResult VKAPI vkDestroyAttachmentView(VkDevice device, VkAttachmentView attachmentView) |
| 747 | { |
| 748 | const VkLayerDispatchTable *disp; |
| 749 | |
| 750 | disp = loader_get_dispatch(device); |
| 751 | |
| 752 | return disp->DestroyAttachmentView(device, attachmentView); |
| 753 | } |
| 754 | |
Courtney Goeltzenleuchter | 0b29b0d | 2015-06-24 18:24:19 -0600 | [diff] [blame] | 755 | LOADER_EXPORT VkResult VKAPI vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModule* pShader) |
| 756 | { |
| 757 | const VkLayerDispatchTable *disp; |
| 758 | |
| 759 | disp = loader_get_dispatch(device); |
| 760 | |
| 761 | return disp->CreateShaderModule(device, pCreateInfo, pShader); |
| 762 | } |
| 763 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 764 | LOADER_EXPORT VkResult VKAPI vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule) |
| 765 | { |
| 766 | const VkLayerDispatchTable *disp; |
| 767 | |
| 768 | disp = loader_get_dispatch(device); |
| 769 | |
| 770 | return disp->DestroyShaderModule(device, shaderModule); |
| 771 | } |
| 772 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 773 | LOADER_EXPORT VkResult VKAPI vkCreateShader(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader) |
| 774 | { |
| 775 | const VkLayerDispatchTable *disp; |
| 776 | |
| 777 | disp = loader_get_dispatch(device); |
| 778 | |
| 779 | return disp->CreateShader(device, pCreateInfo, pShader); |
| 780 | } |
| 781 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 782 | LOADER_EXPORT VkResult VKAPI vkDestroyShader(VkDevice device, VkShader shader) |
| 783 | { |
| 784 | const VkLayerDispatchTable *disp; |
| 785 | |
| 786 | disp = loader_get_dispatch(device); |
| 787 | |
| 788 | return disp->DestroyShader(device, shader); |
| 789 | } |
| 790 | |
Jon Ashburn | 0d60d27 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 791 | LOADER_EXPORT VkResult VKAPI vkCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, VkPipelineCache* pPipelineCache) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 792 | { |
| 793 | const VkLayerDispatchTable *disp; |
| 794 | |
| 795 | disp = loader_get_dispatch(device); |
| 796 | |
Jon Ashburn | 0d60d27 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 797 | return disp->CreatePipelineCache(device, pCreateInfo, pPipelineCache); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 798 | } |
| 799 | |
Jon Ashburn | 0d60d27 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 800 | LOADER_EXPORT VkResult VKAPI vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 801 | { |
| 802 | const VkLayerDispatchTable *disp; |
| 803 | |
| 804 | disp = loader_get_dispatch(device); |
| 805 | |
Jon Ashburn | 0d60d27 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 806 | return disp->DestroyPipelineCache(device, pipelineCache); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 807 | } |
| 808 | |
Jon Ashburn | 0d60d27 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 809 | LOADER_EXPORT size_t VKAPI vkGetPipelineCacheSize(VkDevice device, VkPipelineCache pipelineCache) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 810 | { |
| 811 | const VkLayerDispatchTable *disp; |
| 812 | |
| 813 | disp = loader_get_dispatch(device); |
| 814 | |
Jon Ashburn | 0d60d27 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 815 | return disp->GetPipelineCacheSize(device, pipelineCache); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 816 | } |
| 817 | |
Jon Ashburn | 0d60d27 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 818 | LOADER_EXPORT VkResult VKAPI vkGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, void* pData) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 819 | { |
| 820 | const VkLayerDispatchTable *disp; |
| 821 | |
| 822 | disp = loader_get_dispatch(device); |
| 823 | |
Jon Ashburn | 0d60d27 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 824 | return disp->GetPipelineCacheData(device, pipelineCache, pData); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 825 | } |
| 826 | |
Jon Ashburn | 0d60d27 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 827 | LOADER_EXPORT VkResult VKAPI vkMergePipelineCaches(VkDevice device, VkPipelineCache destCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 828 | { |
| 829 | const VkLayerDispatchTable *disp; |
| 830 | |
| 831 | disp = loader_get_dispatch(device); |
| 832 | |
Jon Ashburn | 0d60d27 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 833 | return disp->MergePipelineCaches(device, destCache, srcCacheCount, pSrcCaches); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 834 | } |
| 835 | |
Jon Ashburn | 0d60d27 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 836 | LOADER_EXPORT VkResult VKAPI vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkGraphicsPipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 837 | { |
| 838 | const VkLayerDispatchTable *disp; |
| 839 | |
| 840 | disp = loader_get_dispatch(device); |
| 841 | |
Jon Ashburn | 0d60d27 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 842 | return disp->CreateGraphicsPipelines(device, pipelineCache, count, pCreateInfos, pPipelines); |
| 843 | } |
| 844 | |
| 845 | LOADER_EXPORT VkResult VKAPI vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkComputePipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines) |
| 846 | { |
| 847 | const VkLayerDispatchTable *disp; |
| 848 | |
| 849 | disp = loader_get_dispatch(device); |
| 850 | |
| 851 | return disp->CreateComputePipelines(device, pipelineCache, count, pCreateInfos, pPipelines); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 852 | } |
| 853 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 854 | LOADER_EXPORT VkResult VKAPI vkDestroyPipeline(VkDevice device, VkPipeline pipeline) |
| 855 | { |
| 856 | const VkLayerDispatchTable *disp; |
| 857 | |
| 858 | disp = loader_get_dispatch(device); |
| 859 | |
| 860 | return disp->DestroyPipeline(device, pipeline); |
| 861 | } |
| 862 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 863 | LOADER_EXPORT VkResult VKAPI vkCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, VkPipelineLayout* pPipelineLayout) |
| 864 | { |
| 865 | const VkLayerDispatchTable *disp; |
| 866 | |
| 867 | disp = loader_get_dispatch(device); |
| 868 | |
| 869 | return disp->CreatePipelineLayout(device, pCreateInfo, pPipelineLayout); |
| 870 | } |
| 871 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 872 | LOADER_EXPORT VkResult VKAPI vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout) |
| 873 | { |
| 874 | const VkLayerDispatchTable *disp; |
| 875 | |
| 876 | disp = loader_get_dispatch(device); |
| 877 | |
| 878 | return disp->DestroyPipelineLayout(device, pipelineLayout); |
| 879 | } |
| 880 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 881 | LOADER_EXPORT VkResult VKAPI vkCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler) |
| 882 | { |
| 883 | const VkLayerDispatchTable *disp; |
| 884 | |
| 885 | disp = loader_get_dispatch(device); |
| 886 | |
| 887 | return disp->CreateSampler(device, pCreateInfo, pSampler); |
| 888 | } |
| 889 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 890 | LOADER_EXPORT VkResult VKAPI vkDestroySampler(VkDevice device, VkSampler sampler) |
| 891 | { |
| 892 | const VkLayerDispatchTable *disp; |
| 893 | |
| 894 | disp = loader_get_dispatch(device); |
| 895 | |
| 896 | return disp->DestroySampler(device, sampler); |
| 897 | } |
| 898 | |
| 899 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 900 | LOADER_EXPORT VkResult VKAPI vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout) |
| 901 | { |
| 902 | const VkLayerDispatchTable *disp; |
| 903 | |
| 904 | disp = loader_get_dispatch(device); |
| 905 | |
| 906 | return disp->CreateDescriptorSetLayout(device, pCreateInfo, pSetLayout); |
| 907 | } |
| 908 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 909 | LOADER_EXPORT VkResult VKAPI vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout) |
| 910 | { |
| 911 | const VkLayerDispatchTable *disp; |
| 912 | |
| 913 | disp = loader_get_dispatch(device); |
| 914 | |
| 915 | return disp->DestroyDescriptorSetLayout(device, descriptorSetLayout); |
| 916 | } |
| 917 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 918 | LOADER_EXPORT VkResult VKAPI vkCreateDescriptorPool(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool) |
| 919 | { |
| 920 | const VkLayerDispatchTable *disp; |
| 921 | |
| 922 | disp = loader_get_dispatch(device); |
| 923 | |
| 924 | return disp->CreateDescriptorPool(device, poolUsage, maxSets, pCreateInfo, pDescriptorPool); |
| 925 | } |
| 926 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 927 | LOADER_EXPORT VkResult VKAPI vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool) |
| 928 | { |
| 929 | const VkLayerDispatchTable *disp; |
| 930 | |
| 931 | disp = loader_get_dispatch(device); |
| 932 | |
| 933 | return disp->DestroyDescriptorPool(device, descriptorPool); |
| 934 | } |
| 935 | |
| 936 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 937 | LOADER_EXPORT VkResult VKAPI vkResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool) |
| 938 | { |
| 939 | const VkLayerDispatchTable *disp; |
| 940 | |
| 941 | disp = loader_get_dispatch(device); |
| 942 | |
| 943 | return disp->ResetDescriptorPool(device, descriptorPool); |
| 944 | } |
| 945 | |
| 946 | LOADER_EXPORT VkResult VKAPI vkAllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount) |
| 947 | { |
| 948 | const VkLayerDispatchTable *disp; |
| 949 | |
| 950 | disp = loader_get_dispatch(device); |
| 951 | |
| 952 | return disp->AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets, pCount); |
| 953 | } |
| 954 | |
Tony Barbour | b857d31 | 2015-07-10 10:50:45 -0600 | [diff] [blame] | 955 | LOADER_EXPORT VkResult VKAPI vkFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets) |
| 956 | { |
| 957 | const VkLayerDispatchTable *disp; |
| 958 | |
| 959 | disp = loader_get_dispatch(device); |
| 960 | |
| 961 | return disp->FreeDescriptorSets(device, descriptorPool, count, pDescriptorSets); |
| 962 | } |
| 963 | |
Chia-I Wu | 8cd8ecd | 2015-05-25 16:27:55 +0800 | [diff] [blame] | 964 | 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] | 965 | { |
| 966 | const VkLayerDispatchTable *disp; |
| 967 | |
| 968 | disp = loader_get_dispatch(device); |
| 969 | |
Chia-I Wu | 8cd8ecd | 2015-05-25 16:27:55 +0800 | [diff] [blame] | 970 | return disp->UpdateDescriptorSets(device, writeCount, pDescriptorWrites, copyCount, pDescriptorCopies); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 971 | } |
| 972 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 973 | LOADER_EXPORT VkResult VKAPI vkCreateDynamicViewportState(VkDevice device, const VkDynamicViewportStateCreateInfo* pCreateInfo, VkDynamicViewportState* pState) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 974 | { |
| 975 | const VkLayerDispatchTable *disp; |
| 976 | |
| 977 | disp = loader_get_dispatch(device); |
| 978 | |
| 979 | return disp->CreateDynamicViewportState(device, pCreateInfo, pState); |
| 980 | } |
| 981 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 982 | LOADER_EXPORT VkResult VKAPI vkDestroyDynamicViewportState(VkDevice device, VkDynamicViewportState dynamicViewportState) |
| 983 | { |
| 984 | const VkLayerDispatchTable *disp; |
| 985 | |
| 986 | disp = loader_get_dispatch(device); |
| 987 | |
| 988 | return disp->DestroyDynamicViewportState(device, dynamicViewportState); |
| 989 | } |
| 990 | |
| 991 | LOADER_EXPORT VkResult VKAPI vkCreateDynamicRasterState(VkDevice device, const VkDynamicRasterStateCreateInfo* pCreateInfo, VkDynamicRasterState* pState) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 992 | { |
| 993 | const VkLayerDispatchTable *disp; |
| 994 | |
| 995 | disp = loader_get_dispatch(device); |
| 996 | |
| 997 | return disp->CreateDynamicRasterState(device, pCreateInfo, pState); |
| 998 | } |
| 999 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1000 | LOADER_EXPORT VkResult VKAPI vkDestroyDynamicRasterState(VkDevice device, VkDynamicRasterState dynamicRasterState) |
| 1001 | { |
| 1002 | const VkLayerDispatchTable *disp; |
| 1003 | |
| 1004 | disp = loader_get_dispatch(device); |
| 1005 | |
| 1006 | return disp->DestroyDynamicRasterState(device, dynamicRasterState); |
| 1007 | } |
| 1008 | |
| 1009 | LOADER_EXPORT VkResult VKAPI vkCreateDynamicColorBlendState(VkDevice device, const VkDynamicColorBlendStateCreateInfo* pCreateInfo, VkDynamicColorBlendState* pState) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1010 | { |
| 1011 | const VkLayerDispatchTable *disp; |
| 1012 | |
| 1013 | disp = loader_get_dispatch(device); |
| 1014 | |
| 1015 | return disp->CreateDynamicColorBlendState(device, pCreateInfo, pState); |
| 1016 | } |
| 1017 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1018 | LOADER_EXPORT VkResult VKAPI vkDestroyDynamicColorBlendState(VkDevice device, VkDynamicColorBlendState dynamicColorBlendState) |
| 1019 | { |
| 1020 | const VkLayerDispatchTable *disp; |
| 1021 | |
| 1022 | disp = loader_get_dispatch(device); |
| 1023 | |
| 1024 | return disp->DestroyDynamicColorBlendState(device, dynamicColorBlendState); |
| 1025 | } |
| 1026 | |
| 1027 | LOADER_EXPORT VkResult VKAPI vkCreateDynamicDepthStencilState(VkDevice device, const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, VkDynamicDepthStencilState* pState) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1028 | { |
| 1029 | const VkLayerDispatchTable *disp; |
| 1030 | |
| 1031 | disp = loader_get_dispatch(device); |
| 1032 | |
| 1033 | return disp->CreateDynamicDepthStencilState(device, pCreateInfo, pState); |
| 1034 | } |
| 1035 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1036 | LOADER_EXPORT VkResult VKAPI vkDestroyDynamicDepthStencilState(VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState) |
| 1037 | { |
| 1038 | const VkLayerDispatchTable *disp; |
| 1039 | |
| 1040 | disp = loader_get_dispatch(device); |
| 1041 | |
| 1042 | return disp->DestroyDynamicDepthStencilState(device, dynamicDepthStencilState); |
| 1043 | } |
| 1044 | |
Cody Northrop | f02f9f8 | 2015-07-09 18:08:05 -0600 | [diff] [blame] | 1045 | LOADER_EXPORT VkResult VKAPI vkCreateCommandPool(VkDevice device, const VkCmdPoolCreateInfo* pCreateInfo, VkCmdPool* pCmdPool) |
| 1046 | { |
| 1047 | const VkLayerDispatchTable *disp; |
| 1048 | |
| 1049 | disp = loader_get_dispatch(device); |
| 1050 | |
| 1051 | return disp->CreateCommandPool(device, pCreateInfo, pCmdPool); |
| 1052 | } |
| 1053 | |
| 1054 | LOADER_EXPORT VkResult VKAPI vkDestroyCommandPool(VkDevice device, VkCmdPool cmdPool) |
| 1055 | { |
| 1056 | const VkLayerDispatchTable *disp; |
| 1057 | |
| 1058 | disp = loader_get_dispatch(device); |
| 1059 | |
| 1060 | return disp->DestroyCommandPool(device, cmdPool); |
| 1061 | } |
| 1062 | |
| 1063 | LOADER_EXPORT VkResult VKAPI vkResetCommandPool(VkDevice device, VkCmdPool cmdPool, VkCmdPoolResetFlags flags) |
| 1064 | { |
| 1065 | const VkLayerDispatchTable *disp; |
| 1066 | |
| 1067 | disp = loader_get_dispatch(device); |
| 1068 | |
| 1069 | return disp->ResetCommandPool(device, cmdPool, flags); |
| 1070 | } |
| 1071 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1072 | LOADER_EXPORT VkResult VKAPI vkCreateCommandBuffer(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer) |
| 1073 | { |
| 1074 | const VkLayerDispatchTable *disp; |
| 1075 | VkResult res; |
| 1076 | |
| 1077 | disp = loader_get_dispatch(device); |
| 1078 | |
| 1079 | res = disp->CreateCommandBuffer(device, pCreateInfo, pCmdBuffer); |
| 1080 | if (res == VK_SUCCESS) { |
| 1081 | loader_init_dispatch(*pCmdBuffer, disp); |
| 1082 | } |
| 1083 | |
| 1084 | return res; |
| 1085 | } |
| 1086 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1087 | LOADER_EXPORT VkResult VKAPI vkDestroyCommandBuffer(VkDevice device, VkCmdBuffer cmdBuffer) |
| 1088 | { |
| 1089 | const VkLayerDispatchTable *disp; |
| 1090 | |
| 1091 | disp = loader_get_dispatch(device); |
| 1092 | |
| 1093 | return disp->DestroyCommandBuffer(device, cmdBuffer); |
| 1094 | } |
| 1095 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1096 | LOADER_EXPORT VkResult VKAPI vkBeginCommandBuffer(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo) |
| 1097 | { |
| 1098 | const VkLayerDispatchTable *disp; |
| 1099 | |
| 1100 | disp = loader_get_dispatch(cmdBuffer); |
| 1101 | |
| 1102 | return disp->BeginCommandBuffer(cmdBuffer, pBeginInfo); |
| 1103 | } |
| 1104 | |
| 1105 | LOADER_EXPORT VkResult VKAPI vkEndCommandBuffer(VkCmdBuffer cmdBuffer) |
| 1106 | { |
| 1107 | const VkLayerDispatchTable *disp; |
| 1108 | |
| 1109 | disp = loader_get_dispatch(cmdBuffer); |
| 1110 | |
| 1111 | return disp->EndCommandBuffer(cmdBuffer); |
| 1112 | } |
| 1113 | |
Cody Northrop | f02f9f8 | 2015-07-09 18:08:05 -0600 | [diff] [blame] | 1114 | LOADER_EXPORT VkResult VKAPI vkResetCommandBuffer(VkCmdBuffer cmdBuffer, VkCmdBufferResetFlags flags) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1115 | { |
| 1116 | const VkLayerDispatchTable *disp; |
| 1117 | |
| 1118 | disp = loader_get_dispatch(cmdBuffer); |
| 1119 | |
Cody Northrop | f02f9f8 | 2015-07-09 18:08:05 -0600 | [diff] [blame] | 1120 | return disp->ResetCommandBuffer(cmdBuffer, flags); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1121 | } |
| 1122 | |
| 1123 | LOADER_EXPORT void VKAPI vkCmdBindPipeline(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) |
| 1124 | { |
| 1125 | const VkLayerDispatchTable *disp; |
| 1126 | |
| 1127 | disp = loader_get_dispatch(cmdBuffer); |
| 1128 | |
| 1129 | disp->CmdBindPipeline(cmdBuffer, pipelineBindPoint, pipeline); |
| 1130 | } |
| 1131 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1132 | LOADER_EXPORT void VKAPI vkCmdBindDynamicViewportState(VkCmdBuffer cmdBuffer, VkDynamicViewportState state) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1133 | { |
| 1134 | const VkLayerDispatchTable *disp; |
| 1135 | |
| 1136 | disp = loader_get_dispatch(cmdBuffer); |
| 1137 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1138 | disp->CmdBindDynamicViewportState(cmdBuffer, state); |
| 1139 | } |
| 1140 | |
| 1141 | LOADER_EXPORT void VKAPI vkCmdBindDynamicRasterState(VkCmdBuffer cmdBuffer, VkDynamicRasterState state) |
| 1142 | { |
| 1143 | const VkLayerDispatchTable *disp; |
| 1144 | |
| 1145 | disp = loader_get_dispatch(cmdBuffer); |
| 1146 | |
| 1147 | disp->CmdBindDynamicRasterState(cmdBuffer, state); |
| 1148 | } |
| 1149 | |
| 1150 | LOADER_EXPORT void VKAPI vkCmdBindDynamicColorBlendState(VkCmdBuffer cmdBuffer, VkDynamicColorBlendState state) |
| 1151 | { |
| 1152 | const VkLayerDispatchTable *disp; |
| 1153 | |
| 1154 | disp = loader_get_dispatch(cmdBuffer); |
| 1155 | |
| 1156 | disp->CmdBindDynamicColorBlendState(cmdBuffer, state); |
| 1157 | } |
| 1158 | |
| 1159 | LOADER_EXPORT void VKAPI vkCmdBindDynamicDepthStencilState(VkCmdBuffer cmdBuffer, VkDynamicDepthStencilState state) |
| 1160 | { |
| 1161 | const VkLayerDispatchTable *disp; |
| 1162 | |
| 1163 | disp = loader_get_dispatch(cmdBuffer); |
| 1164 | |
| 1165 | disp->CmdBindDynamicDepthStencilState(cmdBuffer, state); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1166 | } |
| 1167 | |
Mark Lobodzinski | a65c463 | 2015-06-15 13:21:21 -0600 | [diff] [blame] | 1168 | LOADER_EXPORT void VKAPI vkCmdBindDescriptorSets(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1169 | { |
| 1170 | const VkLayerDispatchTable *disp; |
| 1171 | |
| 1172 | disp = loader_get_dispatch(cmdBuffer); |
| 1173 | |
Mark Lobodzinski | a65c463 | 2015-06-15 13:21:21 -0600 | [diff] [blame] | 1174 | disp->CmdBindDescriptorSets(cmdBuffer, pipelineBindPoint, layout, firstSet, setCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1175 | } |
| 1176 | |
| 1177 | LOADER_EXPORT void VKAPI vkCmdBindVertexBuffers(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) |
| 1178 | { |
| 1179 | const VkLayerDispatchTable *disp; |
| 1180 | |
| 1181 | disp = loader_get_dispatch(cmdBuffer); |
| 1182 | |
| 1183 | disp->CmdBindVertexBuffers(cmdBuffer, startBinding, bindingCount, pBuffers, pOffsets); |
| 1184 | } |
| 1185 | |
| 1186 | LOADER_EXPORT void VKAPI vkCmdBindIndexBuffer(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) |
| 1187 | { |
| 1188 | const VkLayerDispatchTable *disp; |
| 1189 | |
| 1190 | disp = loader_get_dispatch(cmdBuffer); |
| 1191 | |
| 1192 | disp->CmdBindIndexBuffer(cmdBuffer, buffer, offset, indexType); |
| 1193 | } |
| 1194 | |
| 1195 | LOADER_EXPORT void VKAPI vkCmdDraw(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount) |
| 1196 | { |
| 1197 | const VkLayerDispatchTable *disp; |
| 1198 | |
| 1199 | disp = loader_get_dispatch(cmdBuffer); |
| 1200 | |
| 1201 | disp->CmdDraw(cmdBuffer, firstVertex, vertexCount, firstInstance, instanceCount); |
| 1202 | } |
| 1203 | |
| 1204 | LOADER_EXPORT void VKAPI vkCmdDrawIndexed(VkCmdBuffer cmdBuffer, uint32_t firstIndex, uint32_t indexCount, int32_t vertexOffset, uint32_t firstInstance, uint32_t instanceCount) |
| 1205 | { |
| 1206 | const VkLayerDispatchTable *disp; |
| 1207 | |
| 1208 | disp = loader_get_dispatch(cmdBuffer); |
| 1209 | |
| 1210 | disp->CmdDrawIndexed(cmdBuffer, firstIndex, indexCount, vertexOffset, firstInstance, instanceCount); |
| 1211 | } |
| 1212 | |
| 1213 | LOADER_EXPORT void VKAPI vkCmdDrawIndirect(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride) |
| 1214 | { |
| 1215 | const VkLayerDispatchTable *disp; |
| 1216 | |
| 1217 | disp = loader_get_dispatch(cmdBuffer); |
| 1218 | |
| 1219 | disp->CmdDrawIndirect(cmdBuffer, buffer, offset, count, stride); |
| 1220 | } |
| 1221 | |
| 1222 | LOADER_EXPORT void VKAPI vkCmdDrawIndexedIndirect(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride) |
| 1223 | { |
| 1224 | const VkLayerDispatchTable *disp; |
| 1225 | |
| 1226 | disp = loader_get_dispatch(cmdBuffer); |
| 1227 | |
| 1228 | disp->CmdDrawIndexedIndirect(cmdBuffer, buffer, offset, count, stride); |
| 1229 | } |
| 1230 | |
| 1231 | LOADER_EXPORT void VKAPI vkCmdDispatch(VkCmdBuffer cmdBuffer, uint32_t x, uint32_t y, uint32_t z) |
| 1232 | { |
| 1233 | const VkLayerDispatchTable *disp; |
| 1234 | |
| 1235 | disp = loader_get_dispatch(cmdBuffer); |
| 1236 | |
| 1237 | disp->CmdDispatch(cmdBuffer, x, y, z); |
| 1238 | } |
| 1239 | |
| 1240 | LOADER_EXPORT void VKAPI vkCmdDispatchIndirect(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset) |
| 1241 | { |
| 1242 | const VkLayerDispatchTable *disp; |
| 1243 | |
| 1244 | disp = loader_get_dispatch(cmdBuffer); |
| 1245 | |
| 1246 | disp->CmdDispatchIndirect(cmdBuffer, buffer, offset); |
| 1247 | } |
| 1248 | |
| 1249 | LOADER_EXPORT void VKAPI vkCmdCopyBuffer(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkBuffer destBuffer, uint32_t regionCount, const VkBufferCopy* pRegions) |
| 1250 | { |
| 1251 | const VkLayerDispatchTable *disp; |
| 1252 | |
| 1253 | disp = loader_get_dispatch(cmdBuffer); |
| 1254 | |
| 1255 | disp->CmdCopyBuffer(cmdBuffer, srcBuffer, destBuffer, regionCount, pRegions); |
| 1256 | } |
| 1257 | |
| 1258 | LOADER_EXPORT void VKAPI vkCmdCopyImage(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageCopy* pRegions) |
| 1259 | { |
| 1260 | const VkLayerDispatchTable *disp; |
| 1261 | |
| 1262 | disp = loader_get_dispatch(cmdBuffer); |
| 1263 | |
| 1264 | disp->CmdCopyImage(cmdBuffer, srcImage, srcImageLayout, destImage, destImageLayout, regionCount, pRegions); |
| 1265 | } |
| 1266 | |
Mark Lobodzinski | 20f6859 | 2015-05-22 14:43:25 -0500 | [diff] [blame] | 1267 | 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] | 1268 | { |
| 1269 | const VkLayerDispatchTable *disp; |
| 1270 | |
| 1271 | disp = loader_get_dispatch(cmdBuffer); |
| 1272 | |
Mark Lobodzinski | 20f6859 | 2015-05-22 14:43:25 -0500 | [diff] [blame] | 1273 | disp->CmdBlitImage(cmdBuffer, srcImage, srcImageLayout, destImage, destImageLayout, regionCount, pRegions, filter); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1274 | } |
| 1275 | |
| 1276 | LOADER_EXPORT void VKAPI vkCmdCopyBufferToImage(VkCmdBuffer cmdBuffer, VkBuffer srcBuffer, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions) |
| 1277 | { |
| 1278 | const VkLayerDispatchTable *disp; |
| 1279 | |
| 1280 | disp = loader_get_dispatch(cmdBuffer); |
| 1281 | |
| 1282 | disp->CmdCopyBufferToImage(cmdBuffer, srcBuffer, destImage, destImageLayout, regionCount, pRegions); |
| 1283 | } |
| 1284 | |
| 1285 | LOADER_EXPORT void VKAPI vkCmdCopyImageToBuffer(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer destBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) |
| 1286 | { |
| 1287 | const VkLayerDispatchTable *disp; |
| 1288 | |
| 1289 | disp = loader_get_dispatch(cmdBuffer); |
| 1290 | |
| 1291 | disp->CmdCopyImageToBuffer(cmdBuffer, srcImage, srcImageLayout, destBuffer, regionCount, pRegions); |
| 1292 | } |
| 1293 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1294 | LOADER_EXPORT void VKAPI vkCmdUpdateBuffer(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize dataSize, const uint32_t* pData) |
| 1295 | { |
| 1296 | const VkLayerDispatchTable *disp; |
| 1297 | |
| 1298 | disp = loader_get_dispatch(cmdBuffer); |
| 1299 | |
| 1300 | disp->CmdUpdateBuffer(cmdBuffer, destBuffer, destOffset, dataSize, pData); |
| 1301 | } |
| 1302 | |
| 1303 | LOADER_EXPORT void VKAPI vkCmdFillBuffer(VkCmdBuffer cmdBuffer, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize fillSize, uint32_t data) |
| 1304 | { |
| 1305 | const VkLayerDispatchTable *disp; |
| 1306 | |
| 1307 | disp = loader_get_dispatch(cmdBuffer); |
| 1308 | |
| 1309 | disp->CmdFillBuffer(cmdBuffer, destBuffer, destOffset, fillSize, data); |
| 1310 | } |
| 1311 | |
Chris Forbes | e310597 | 2015-06-24 14:34:53 +1200 | [diff] [blame] | 1312 | LOADER_EXPORT void VKAPI vkCmdClearColorImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1313 | { |
| 1314 | const VkLayerDispatchTable *disp; |
| 1315 | |
| 1316 | disp = loader_get_dispatch(cmdBuffer); |
| 1317 | |
| 1318 | disp->CmdClearColorImage(cmdBuffer, image, imageLayout, pColor, rangeCount, pRanges); |
| 1319 | } |
| 1320 | |
Chris Forbes | 2951d7d | 2015-06-22 17:21:59 +1200 | [diff] [blame] | 1321 | LOADER_EXPORT void VKAPI vkCmdClearDepthStencilImage(VkCmdBuffer cmdBuffer, VkImage image, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1322 | { |
| 1323 | const VkLayerDispatchTable *disp; |
| 1324 | |
| 1325 | disp = loader_get_dispatch(cmdBuffer); |
| 1326 | |
Chris Forbes | 2951d7d | 2015-06-22 17:21:59 +1200 | [diff] [blame] | 1327 | disp->CmdClearDepthStencilImage(cmdBuffer, image, imageLayout, depth, stencil, rangeCount, pRanges); |
| 1328 | } |
| 1329 | |
Chris Forbes | e310597 | 2015-06-24 14:34:53 +1200 | [diff] [blame] | 1330 | LOADER_EXPORT void VKAPI vkCmdClearColorAttachment(VkCmdBuffer cmdBuffer, uint32_t colorAttachment, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rectCount, const VkRect3D* pRects) |
Chris Forbes | 2951d7d | 2015-06-22 17:21:59 +1200 | [diff] [blame] | 1331 | { |
| 1332 | const VkLayerDispatchTable *disp; |
| 1333 | |
| 1334 | disp = loader_get_dispatch(cmdBuffer); |
| 1335 | |
| 1336 | disp->CmdClearColorAttachment(cmdBuffer, colorAttachment, imageLayout, pColor, rectCount, pRects); |
| 1337 | } |
| 1338 | |
| 1339 | LOADER_EXPORT void VKAPI vkCmdClearDepthStencilAttachment(VkCmdBuffer cmdBuffer, VkImageAspectFlags imageAspectMask, VkImageLayout imageLayout, float depth, uint32_t stencil, uint32_t rectCount, const VkRect3D* pRects) |
| 1340 | { |
| 1341 | const VkLayerDispatchTable *disp; |
| 1342 | |
| 1343 | disp = loader_get_dispatch(cmdBuffer); |
| 1344 | |
| 1345 | disp->CmdClearDepthStencilAttachment(cmdBuffer, imageAspectMask, imageLayout, depth, stencil, rectCount, pRects); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1346 | } |
| 1347 | |
| 1348 | LOADER_EXPORT void VKAPI vkCmdResolveImage(VkCmdBuffer cmdBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage destImage, VkImageLayout destImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) |
| 1349 | { |
| 1350 | const VkLayerDispatchTable *disp; |
| 1351 | |
| 1352 | disp = loader_get_dispatch(cmdBuffer); |
| 1353 | |
| 1354 | disp->CmdResolveImage(cmdBuffer, srcImage, srcImageLayout, destImage, destImageLayout, regionCount, pRegions); |
| 1355 | } |
| 1356 | |
Tony Barbour | c2e987e | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 1357 | LOADER_EXPORT void VKAPI vkCmdSetEvent(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1358 | { |
| 1359 | const VkLayerDispatchTable *disp; |
| 1360 | |
| 1361 | disp = loader_get_dispatch(cmdBuffer); |
| 1362 | |
Tony Barbour | c2e987e | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 1363 | disp->CmdSetEvent(cmdBuffer, event, stageMask); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1364 | } |
| 1365 | |
Tony Barbour | c2e987e | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 1366 | LOADER_EXPORT void VKAPI vkCmdResetEvent(VkCmdBuffer cmdBuffer, VkEvent event, VkPipelineStageFlags stageMask) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1367 | { |
| 1368 | const VkLayerDispatchTable *disp; |
| 1369 | |
| 1370 | disp = loader_get_dispatch(cmdBuffer); |
| 1371 | |
Tony Barbour | c2e987e | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 1372 | disp->CmdResetEvent(cmdBuffer, event, stageMask); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1373 | } |
| 1374 | |
Courtney Goeltzenleuchter | d9ba342 | 2015-07-12 12:58:58 -0600 | [diff] [blame] | 1375 | LOADER_EXPORT void VKAPI vkCmdWaitEvents(VkCmdBuffer cmdBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags sourceStageMask, VkPipelineStageFlags destStageMask, uint32_t memBarrierCount, const void* const* ppMemBarriers) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1376 | { |
| 1377 | const VkLayerDispatchTable *disp; |
| 1378 | |
| 1379 | disp = loader_get_dispatch(cmdBuffer); |
| 1380 | |
Tony Barbour | c2e987e | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 1381 | disp->CmdWaitEvents(cmdBuffer, eventCount, pEvents, sourceStageMask, destStageMask, memBarrierCount, ppMemBarriers); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1382 | } |
| 1383 | |
Courtney Goeltzenleuchter | 82b348f | 2015-07-12 13:07:46 -0600 | [diff] [blame] | 1384 | LOADER_EXPORT void VKAPI vkCmdPipelineBarrier(VkCmdBuffer cmdBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags destStageMask, VkBool32 byRegion, uint32_t memBarrierCount, const void* const* ppMemBarriers) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1385 | { |
| 1386 | const VkLayerDispatchTable *disp; |
| 1387 | |
| 1388 | disp = loader_get_dispatch(cmdBuffer); |
| 1389 | |
Courtney Goeltzenleuchter | 82b348f | 2015-07-12 13:07:46 -0600 | [diff] [blame] | 1390 | disp->CmdPipelineBarrier(cmdBuffer, srcStageMask, destStageMask, byRegion, memBarrierCount, ppMemBarriers); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1391 | } |
| 1392 | |
| 1393 | LOADER_EXPORT void VKAPI vkCmdBeginQuery(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot, VkFlags flags) |
| 1394 | { |
| 1395 | const VkLayerDispatchTable *disp; |
| 1396 | |
| 1397 | disp = loader_get_dispatch(cmdBuffer); |
| 1398 | |
| 1399 | disp->CmdBeginQuery(cmdBuffer, queryPool, slot, flags); |
| 1400 | } |
| 1401 | |
| 1402 | LOADER_EXPORT void VKAPI vkCmdEndQuery(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t slot) |
| 1403 | { |
| 1404 | const VkLayerDispatchTable *disp; |
| 1405 | |
| 1406 | disp = loader_get_dispatch(cmdBuffer); |
| 1407 | |
| 1408 | disp->CmdEndQuery(cmdBuffer, queryPool, slot); |
| 1409 | } |
| 1410 | |
| 1411 | LOADER_EXPORT void VKAPI vkCmdResetQueryPool(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount) |
| 1412 | { |
| 1413 | const VkLayerDispatchTable *disp; |
| 1414 | |
| 1415 | disp = loader_get_dispatch(cmdBuffer); |
| 1416 | |
| 1417 | disp->CmdResetQueryPool(cmdBuffer, queryPool, startQuery, queryCount); |
| 1418 | } |
| 1419 | |
| 1420 | LOADER_EXPORT void VKAPI vkCmdWriteTimestamp(VkCmdBuffer cmdBuffer, VkTimestampType timestampType, VkBuffer destBuffer, VkDeviceSize destOffset) |
| 1421 | { |
| 1422 | const VkLayerDispatchTable *disp; |
| 1423 | |
| 1424 | disp = loader_get_dispatch(cmdBuffer); |
| 1425 | |
| 1426 | disp->CmdWriteTimestamp(cmdBuffer, timestampType, destBuffer, destOffset); |
| 1427 | } |
| 1428 | |
| 1429 | LOADER_EXPORT void VKAPI vkCmdCopyQueryPoolResults(VkCmdBuffer cmdBuffer, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, VkBuffer destBuffer, VkDeviceSize destOffset, VkDeviceSize destStride, VkFlags flags) |
| 1430 | { |
| 1431 | const VkLayerDispatchTable *disp; |
| 1432 | |
| 1433 | disp = loader_get_dispatch(cmdBuffer); |
| 1434 | |
| 1435 | disp->CmdCopyQueryPoolResults(cmdBuffer, queryPool, startQuery, queryCount, destBuffer, destOffset, destStride, flags); |
| 1436 | } |
| 1437 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1438 | LOADER_EXPORT VkResult VKAPI vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer) |
| 1439 | { |
| 1440 | const VkLayerDispatchTable *disp; |
| 1441 | |
| 1442 | disp = loader_get_dispatch(device); |
| 1443 | |
| 1444 | return disp->CreateFramebuffer(device, pCreateInfo, pFramebuffer); |
| 1445 | } |
| 1446 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1447 | LOADER_EXPORT VkResult VKAPI vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer) |
| 1448 | { |
| 1449 | const VkLayerDispatchTable *disp; |
| 1450 | |
| 1451 | disp = loader_get_dispatch(device); |
| 1452 | |
| 1453 | return disp->DestroyFramebuffer(device, framebuffer); |
| 1454 | } |
| 1455 | |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1456 | LOADER_EXPORT VkResult VKAPI vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass) |
| 1457 | { |
| 1458 | const VkLayerDispatchTable *disp; |
| 1459 | |
| 1460 | disp = loader_get_dispatch(device); |
| 1461 | |
| 1462 | return disp->CreateRenderPass(device, pCreateInfo, pRenderPass); |
| 1463 | } |
| 1464 | |
Tony Barbour | de4124d | 2015-07-03 10:33:54 -0600 | [diff] [blame] | 1465 | LOADER_EXPORT VkResult VKAPI vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass) |
| 1466 | { |
| 1467 | const VkLayerDispatchTable *disp; |
| 1468 | |
| 1469 | disp = loader_get_dispatch(device); |
| 1470 | |
| 1471 | return disp->DestroyRenderPass(device, renderPass); |
| 1472 | } |
| 1473 | |
Chia-I Wu | c278df8 | 2015-07-07 11:50:03 +0800 | [diff] [blame] | 1474 | LOADER_EXPORT void VKAPI vkCmdBeginRenderPass(VkCmdBuffer cmdBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkRenderPassContents contents) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1475 | { |
| 1476 | const VkLayerDispatchTable *disp; |
| 1477 | |
| 1478 | disp = loader_get_dispatch(cmdBuffer); |
| 1479 | |
Chia-I Wu | c278df8 | 2015-07-07 11:50:03 +0800 | [diff] [blame] | 1480 | disp->CmdBeginRenderPass(cmdBuffer, pRenderPassBegin, contents); |
| 1481 | } |
| 1482 | |
| 1483 | LOADER_EXPORT void VKAPI vkCmdNextSubpass(VkCmdBuffer cmdBuffer, VkRenderPassContents contents) |
| 1484 | { |
| 1485 | const VkLayerDispatchTable *disp; |
| 1486 | |
| 1487 | disp = loader_get_dispatch(cmdBuffer); |
| 1488 | |
| 1489 | disp->CmdNextSubpass(cmdBuffer, contents); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1490 | } |
| 1491 | |
Chia-I Wu | 88eaa3b | 2015-06-26 15:34:39 +0800 | [diff] [blame] | 1492 | LOADER_EXPORT void VKAPI vkCmdEndRenderPass(VkCmdBuffer cmdBuffer) |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1493 | { |
| 1494 | const VkLayerDispatchTable *disp; |
| 1495 | |
| 1496 | disp = loader_get_dispatch(cmdBuffer); |
| 1497 | |
Chia-I Wu | 88eaa3b | 2015-06-26 15:34:39 +0800 | [diff] [blame] | 1498 | disp->CmdEndRenderPass(cmdBuffer); |
| 1499 | } |
| 1500 | |
| 1501 | LOADER_EXPORT void VKAPI vkCmdExecuteCommands(VkCmdBuffer cmdBuffer, uint32_t cmdBuffersCount, const VkCmdBuffer* pCmdBuffers) |
| 1502 | { |
| 1503 | const VkLayerDispatchTable *disp; |
| 1504 | |
| 1505 | disp = loader_get_dispatch(cmdBuffer); |
| 1506 | |
| 1507 | disp->CmdExecuteCommands(cmdBuffer, cmdBuffersCount, pCmdBuffers); |
Jon Ashburn | 2139a3e | 2015-05-06 09:02:10 -0600 | [diff] [blame] | 1508 | } |