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