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