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