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