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 | |
43 | #include <Vulkan/VulkanPlatform.h> |
44 | |
45 | extern "C" |
46 | { |
47 | |
48 | // VK_KHR_bind_memory2 |
49 | VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) |
50 | { |
51 | return vkBindBufferMemory2(device, bindInfoCount, pBindInfos); |
52 | } |
53 | |
54 | VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos) |
55 | { |
56 | return vkBindImageMemory2(device, bindInfoCount, pBindInfos); |
57 | } |
58 | |
59 | // VK_KHR_descriptor_update_template |
60 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) |
61 | { |
62 | return vkCreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); |
63 | } |
64 | |
65 | VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator) |
66 | { |
67 | vkDestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator); |
68 | } |
69 | |
70 | VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData) |
71 | { |
72 | vkUpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, pData); |
73 | } |
74 | |
75 | // VK_KHR_device_group |
76 | VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) |
77 | { |
78 | vkGetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures); |
79 | } |
80 | |
81 | VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask) |
82 | { |
83 | vkCmdSetDeviceMask(commandBuffer, deviceMask); |
84 | } |
85 | |
86 | 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) |
87 | { |
88 | vkCmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); |
89 | } |
90 | |
91 | // VK_KHR_device_group_creation |
92 | VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) |
93 | { |
94 | return vkEnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties); |
95 | } |
96 | |
97 | // VK_KHR_external_fence_capabilities |
98 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties) |
99 | { |
100 | vkGetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); |
101 | } |
102 | |
103 | // VK_KHR_external_memory_capabilities |
104 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties) |
105 | { |
106 | vkGetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, pExternalBufferProperties); |
107 | } |
108 | |
109 | // VK_KHR_external_semaphore_capabilities |
110 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties) |
111 | { |
112 | vkGetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties); |
113 | } |
114 | |
115 | // VK_KHR_get_memory_requirements2 |
116 | VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) |
117 | { |
118 | vkGetImageMemoryRequirements2(device, pInfo, pMemoryRequirements); |
119 | } |
120 | |
121 | VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) |
122 | { |
123 | vkGetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements); |
124 | } |
125 | |
126 | VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) |
127 | { |
128 | vkGetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); |
129 | } |
130 | |
131 | // VK_KHR_get_physical_device_properties2 |
132 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) |
133 | { |
134 | vkGetPhysicalDeviceFeatures2(physicalDevice, pFeatures); |
135 | } |
136 | |
137 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties) |
138 | { |
139 | vkGetPhysicalDeviceProperties2(physicalDevice, pProperties); |
140 | } |
141 | |
142 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties) |
143 | { |
144 | vkGetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties); |
145 | } |
146 | |
147 | VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties) |
148 | { |
149 | return vkGetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, pImageFormatProperties); |
150 | } |
151 | |
152 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties) |
153 | { |
154 | vkGetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); |
155 | } |
156 | |
157 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties) |
158 | { |
159 | vkGetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties); |
160 | } |
161 | |
162 | VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties) |
163 | { |
164 | vkGetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, pProperties); |
165 | } |
166 | |
167 | // VK_KHR_maintenance1 |
168 | VKAPI_ATTR void VKAPI_CALL vkTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags) |
169 | { |
170 | vkTrimCommandPool(device, commandPool, flags); |
171 | } |
172 | |
173 | // VK_KHR_maintenance3 |
174 | VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport) |
175 | { |
176 | vkGetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport); |
177 | } |
178 | |
179 | // VK_KHR_sampler_ycbcr_conversion |
180 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion) |
181 | { |
182 | return vkCreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion); |
183 | } |
184 | |
185 | VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator) |
186 | { |
187 | vkDestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator); |
188 | } |
189 | |
190 | } |