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