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