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