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