Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 1 | // Copyright 2018 The SwiftShader Authors. All Rights Reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | // This file contains function definitions for extensions Vulkan 1.1 |
| 16 | // promoted into the core API. (See spec Appendix D: Core Revisions) |
| 17 | |
| 18 | // The current list of promoted extensions is: |
| 19 | // VK_KHR_16bit_storage (no functions in this extension) |
| 20 | // VK_KHR_bind_memory2 |
| 21 | // VK_KHR_dedicated_allocation (no functions in this extension) |
| 22 | // VK_KHR_descriptor_update_template |
| 23 | // VK_KHR_device_group |
| 24 | // VK_KHR_device_group_creation |
| 25 | // VK_KHR_external_fence (no functions in this extension) |
| 26 | // VK_KHR_external_fence_capabilities |
| 27 | // VK_KHR_external_memory (no functions in this extension) |
| 28 | // VK_KHR_external_memory_capabilities |
| 29 | // VK_KHR_external_semaphore (no functions in this extension) |
| 30 | // VK_KHR_external_semaphore_capabilities |
| 31 | // VK_KHR_get_memory_requirements2 |
| 32 | // VK_KHR_get_physical_device_properties2 |
| 33 | // VK_KHR_maintenance1 |
| 34 | // VK_KHR_maintenance2 (no functions in this extension) |
| 35 | // VK_KHR_maintenance3 |
| 36 | // VK_KHR_multiview (no functions in this extension) |
| 37 | // VK_KHR_relaxed_block_layout (no functions in this extension) |
| 38 | // VK_KHR_sampler_ycbcr_conversion |
| 39 | // VK_KHR_shader_draw_parameters (no functions in this extension) |
| 40 | // VK_KHR_storage_buffer_storage_class (no functions in this extension) |
| 41 | // VK_KHR_variable_pointers (no functions in this extension) |
| 42 | |
Antonio Maiorano | 42fd159 | 2020-04-27 11:30:40 -0400 | [diff] [blame] | 43 | #include "Vulkan/VulkanPlatform.hpp" |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 44 | |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 45 | extern "C" { |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 46 | |
| 47 | // VK_KHR_bind_memory2 |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 48 | VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo *pBindInfos) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 49 | { |
| 50 | return vkBindBufferMemory2(device, bindInfoCount, pBindInfos); |
| 51 | } |
| 52 | |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 53 | VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo *pBindInfos) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 54 | { |
| 55 | return vkBindImageMemory2(device, bindInfoCount, pBindInfos); |
| 56 | } |
| 57 | |
| 58 | // VK_KHR_descriptor_update_template |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 59 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorUpdateTemplate *pDescriptorUpdateTemplate) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 60 | { |
| 61 | return vkCreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); |
| 62 | } |
| 63 | |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 64 | VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks *pAllocator) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 65 | { |
| 66 | vkDestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator); |
| 67 | } |
| 68 | |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 69 | VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void *pData) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 70 | { |
| 71 | vkUpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, pData); |
| 72 | } |
| 73 | |
| 74 | // VK_KHR_device_group |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 75 | VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags *pPeerMemoryFeatures) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 76 | { |
| 77 | vkGetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures); |
| 78 | } |
| 79 | |
| 80 | VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask) |
| 81 | { |
| 82 | vkCmdSetDeviceMask(commandBuffer, deviceMask); |
| 83 | } |
| 84 | |
| 85 | VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) |
| 86 | { |
| 87 | vkCmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); |
| 88 | } |
| 89 | |
| 90 | // VK_KHR_device_group_creation |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 91 | VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t *pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties *pPhysicalDeviceGroupProperties) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 92 | { |
| 93 | return vkEnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties); |
| 94 | } |
| 95 | |
| 96 | // VK_KHR_external_fence_capabilities |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 97 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo *pExternalFenceInfo, VkExternalFenceProperties *pExternalFenceProperties) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 98 | { |
| 99 | vkGetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); |
| 100 | } |
| 101 | |
| 102 | // VK_KHR_external_memory_capabilities |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 103 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo *pExternalBufferInfo, VkExternalBufferProperties *pExternalBufferProperties) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 104 | { |
| 105 | vkGetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, pExternalBufferProperties); |
| 106 | } |
| 107 | |
| 108 | // VK_KHR_external_semaphore_capabilities |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 109 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo *pExternalSemaphoreInfo, VkExternalSemaphoreProperties *pExternalSemaphoreProperties) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 110 | { |
| 111 | vkGetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties); |
| 112 | } |
| 113 | |
| 114 | // VK_KHR_get_memory_requirements2 |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 115 | VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2 *pInfo, VkMemoryRequirements2 *pMemoryRequirements) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 116 | { |
| 117 | vkGetImageMemoryRequirements2(device, pInfo, pMemoryRequirements); |
| 118 | } |
| 119 | |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 120 | VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2 *pInfo, VkMemoryRequirements2 *pMemoryRequirements) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 121 | { |
| 122 | vkGetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements); |
| 123 | } |
| 124 | |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 125 | VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2 *pInfo, uint32_t *pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2 *pSparseMemoryRequirements) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 126 | { |
| 127 | vkGetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); |
| 128 | } |
| 129 | |
| 130 | // VK_KHR_get_physical_device_properties2 |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 131 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2 *pFeatures) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 132 | { |
| 133 | vkGetPhysicalDeviceFeatures2(physicalDevice, pFeatures); |
| 134 | } |
| 135 | |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 136 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2 *pProperties) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 137 | { |
| 138 | vkGetPhysicalDeviceProperties2(physicalDevice, pProperties); |
| 139 | } |
| 140 | |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 141 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2 *pFormatProperties) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 142 | { |
| 143 | vkGetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties); |
| 144 | } |
| 145 | |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 146 | VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2 *pImageFormatProperties) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 147 | { |
| 148 | return vkGetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, pImageFormatProperties); |
| 149 | } |
| 150 | |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 151 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties2 *pQueueFamilyProperties) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 152 | { |
| 153 | vkGetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); |
| 154 | } |
| 155 | |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 156 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2 *pMemoryProperties) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 157 | { |
| 158 | vkGetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties); |
| 159 | } |
| 160 | |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 161 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2 *pFormatInfo, uint32_t *pPropertyCount, VkSparseImageFormatProperties2 *pProperties) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 162 | { |
| 163 | vkGetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, pProperties); |
| 164 | } |
| 165 | |
| 166 | // VK_KHR_maintenance1 |
| 167 | VKAPI_ATTR void VKAPI_CALL vkTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags) |
| 168 | { |
| 169 | vkTrimCommandPool(device, commandPool, flags); |
| 170 | } |
| 171 | |
| 172 | // VK_KHR_maintenance3 |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 173 | VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, VkDescriptorSetLayoutSupport *pSupport) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 174 | { |
| 175 | vkGetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport); |
| 176 | } |
| 177 | |
| 178 | // VK_KHR_sampler_ycbcr_conversion |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 179 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSamplerYcbcrConversion *pYcbcrConversion) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 180 | { |
| 181 | return vkCreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion); |
| 182 | } |
| 183 | |
Ben Clayton | 2ed93ab | 2019-12-17 20:38:03 +0000 | [diff] [blame] | 184 | VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks *pAllocator) |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 185 | { |
| 186 | vkDestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator); |
| 187 | } |
Alexis Hetu | d73b871 | 2018-09-21 15:14:43 -0400 | [diff] [blame] | 188 | } |