• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Vulkan支持能力
2
3<!--Kit: ArkGraphics 2D-->
4<!--Subsystem: Graphic-->
5<!--Owner: @andrew1993-->
6<!--Designer: @ext4FAT1-->
7<!--Tester: @nobuggers-->
8<!--Adviser: @ge-yafang-->
9
10[Vulkan](https://www.vulkan.org/)是一套2D和3D绘图应用程序接口,具有跨平台、高性能的特点。OpenHarmony SDK 现已支持Vulkan v1.4.309版本接口,具体可用版本取决于GPU驱动实现。
11
12## 支持的标准库接口列表
13
14支持Vulkan v1.4.309版本的部分接口能力,具体请见下表。
15
16|符号类型|符号名|
17| --- | --- |
18|FUNC|vkAcquireNextImage2KHR|
19|FUNC|vkAcquireNextImageKHR|
20|FUNC|vkAllocateCommandBuffers|
21|FUNC|vkAllocateDescriptorSets|
22|FUNC|vkAllocateMemory|
23|FUNC|vkBeginCommandBuffer|
24|FUNC|vkBindBufferMemory|
25|FUNC|vkBindBufferMemory2|
26|FUNC|vkBindImageMemory|
27|FUNC|vkBindImageMemory2|
28|FUNC|vkCmdBeginQuery|
29|FUNC|vkCmdBeginRendering|
30|FUNC|vkCmdBeginRenderPass|
31|FUNC|vkCmdBeginRenderPass2|
32|FUNC|vkCmdBindDescriptorSets|
33|FUNC|vkCmdBindDescriptorSets2|
34|FUNC|vkCmdBindIndexBuffer|
35|FUNC|vkCmdBindIndexBuffer2|
36|FUNC|vkCmdBindPipeline|
37|FUNC|vkCmdBindVertexBuffers|
38|FUNC|vkCmdBindVertexBuffers2|
39|FUNC|vkCmdBlitImage|
40|FUNC|vkCmdBlitImage2|
41|FUNC|vkCmdClearAttachments|
42|FUNC|vkCmdClearColorImage|
43|FUNC|vkCmdClearDepthStencilImage|
44|FUNC|vkCmdCopyBuffer|
45|FUNC|vkCmdCopyBuffer2|
46|FUNC|vkCmdCopyBufferToImage|
47|FUNC|vkCmdCopyBufferToImage2|
48|FUNC|vkCmdCopyImage|
49|FUNC|vkCmdCopyImage2|
50|FUNC|vkCmdCopyImageToBuffer|
51|FUNC|vkCmdCopyImageToBuffer2|
52|FUNC|vkCmdCopyQueryPoolResults|
53|FUNC|vkCmdDispatch|
54|FUNC|vkCmdDispatchBase|
55|FUNC|vkCmdDispatchIndirect|
56|FUNC|vkCmdDraw|
57|FUNC|vkCmdDrawIndexed|
58|FUNC|vkCmdDrawIndexedIndirect|
59|FUNC|vkCmdDrawIndexedIndirectCount|
60|FUNC|vkCmdDrawIndirect|
61|FUNC|vkCmdDrawIndirectCount|
62|FUNC|vkCmdEndQuery|
63|FUNC|vkCmdEndRendering|
64|FUNC|vkCmdEndRenderPass|
65|FUNC|vkCmdEndRenderPass2|
66|FUNC|vkCmdExecuteCommands|
67|FUNC|vkCmdFillBuffer|
68|FUNC|vkCmdNextSubpass|
69|FUNC|vkCmdNextSubpass2|
70|FUNC|vkCmdPipelineBarrier|
71|FUNC|vkCmdPipelineBarrier2|
72|FUNC|vkCmdPushConstants|
73|FUNC|vkCmdPushConstants2|
74|FUNC|vkCmdPushDescriptorSet|
75|FUNC|vkCmdPushDescriptorSet2|
76|FUNC|vkCmdPushDescriptorSetWithTemplate|
77|FUNC|vkCmdPushDescriptorSetWithTemplate2|
78|FUNC|vkCmdResetEvent|
79|FUNC|vkCmdResetEvent2|
80|FUNC|vkCmdResetQueryPool|
81|FUNC|vkCmdResolveImage|
82|FUNC|vkCmdResolveImage2|
83|FUNC|vkCmdSetBlendConstants|
84|FUNC|vkCmdSetCullMode|
85|FUNC|vkCmdSetDepthBias|
86|FUNC|vkCmdSetDepthBiasEnable|
87|FUNC|vkCmdSetDepthBounds|
88|FUNC|vkCmdSetDepthBoundsTestEnable|
89|FUNC|vkCmdSetDepthCompareOp|
90|FUNC|vkCmdSetDepthTestEnable|
91|FUNC|vkCmdSetDepthWriteEnable|
92|FUNC|vkCmdSetDeviceMask|
93|FUNC|vkCmdSetEvent|
94|FUNC|vkCmdSetEvent2|
95|FUNC|vkCmdSetFrontFace|
96|FUNC|vkCmdSetLineStipple|
97|FUNC|vkCmdSetLineWidth|
98|FUNC|vkCmdSetPrimitiveRestartEnable|
99|FUNC|vkCmdSetPrimitiveTopology|
100|FUNC|vkCmdSetRasterizerDiscardEnable|
101|FUNC|vkCmdSetRenderingAttachmentLocations|
102|FUNC|vkCmdSetRenderingInputAttachmentIndices|
103|FUNC|vkCmdSetScissor|
104|FUNC|vkCmdSetScissorWithCount|
105|FUNC|vkCmdSetStencilCompareMask|
106|FUNC|vkCmdSetStencilOp|
107|FUNC|vkCmdSetStencilReference|
108|FUNC|vkCmdSetStencilTestEnable|
109|FUNC|vkCmdSetStencilWriteMask|
110|FUNC|vkCmdSetViewport|
111|FUNC|vkCmdSetViewportWithCount|
112|FUNC|vkCmdUpdateBuffer|
113|FUNC|vkCmdWaitEvents|
114|FUNC|vkCmdWaitEvents2|
115|FUNC|vkCmdWriteTimestamp|
116|FUNC|vkCmdWriteTimestamp2|
117|FUNC|vkCopyImageToImage|
118|FUNC|vkCopyImageToMemory|
119|FUNC|vkCopyMemoryToImage|
120|FUNC|vkCreateBuffer|
121|FUNC|vkCreateBufferView|
122|FUNC|vkCreateCommandPool|
123|FUNC|vkCreateComputePipelines|
124|FUNC|vkCreateDescriptorPool|
125|FUNC|vkCreateDescriptorSetLayout|
126|FUNC|vkCreateDescriptorUpdateTemplate|
127|FUNC|vkCreateDevice|
128|FUNC|vkCreateDisplayModeKHR|
129|FUNC|vkCreateDisplayPlaneSurfaceKHR|
130|FUNC|vkCreateEvent|
131|FUNC|vkCreateFence|
132|FUNC|vkCreateFramebuffer|
133|FUNC|vkCreateGraphicsPipelines|
134|FUNC|vkCreateHeadlessSurfaceEXT|
135|FUNC|vkCreateImage|
136|FUNC|vkCreateImageView|
137|FUNC|vkCreateInstance|
138|FUNC|vkCreatePipelineCache|
139|FUNC|vkCreatePipelineLayout|
140|FUNC|vkCreatePrivateDataSlot|
141|FUNC|vkCreateQueryPool|
142|FUNC|vkCreateRenderPass|
143|FUNC|vkCreateRenderPass2|
144|FUNC|vkCreateSampler|
145|FUNC|vkCreateSamplerYcbcrConversion|
146|FUNC|vkCreateSemaphore|
147|FUNC|vkCreateShaderModule|
148|FUNC|vkCreateSharedSwapchainsKHR|
149|FUNC|vkCreateSwapchainKHR|
150|FUNC|vkDestroyBuffer|
151|FUNC|vkDestroyBufferView|
152|FUNC|vkDestroyCommandPool|
153|FUNC|vkDestroyDescriptorPool|
154|FUNC|vkDestroyDescriptorSetLayout|
155|FUNC|vkDestroyDescriptorUpdateTemplate|
156|FUNC|vkDestroyDevice|
157|FUNC|vkDestroyEvent|
158|FUNC|vkDestroyFence|
159|FUNC|vkDestroyFramebuffer|
160|FUNC|vkDestroyImage|
161|FUNC|vkDestroyImageView|
162|FUNC|vkDestroyInstance|
163|FUNC|vkDestroyPipeline|
164|FUNC|vkDestroyPipelineCache|
165|FUNC|vkDestroyPipelineLayout|
166|FUNC|vkDestroyPrivateDataSlot|
167|FUNC|vkDestroyQueryPool|
168|FUNC|vkDestroyRenderPass|
169|FUNC|vkDestroySampler|
170|FUNC|vkDestroySamplerYcbcrConversion|
171|FUNC|vkDestroySemaphore|
172|FUNC|vkDestroyShaderModule|
173|FUNC|vkDestroySurfaceKHR|
174|FUNC|vkDestroySwapchainKHR|
175|FUNC|vkDeviceWaitIdle|
176|FUNC|vkEndCommandBuffer|
177|FUNC|vkEnumerateDeviceExtensionProperties|
178|FUNC|vkEnumerateDeviceLayerProperties|
179|FUNC|vkEnumerateInstanceExtensionProperties|
180|FUNC|vkEnumerateInstanceLayerProperties|
181|FUNC|vkEnumerateInstanceVersion|
182|FUNC|vkEnumeratePhysicalDeviceGroups|
183|FUNC|vkEnumeratePhysicalDevices|
184|FUNC|vkFlushMappedMemoryRanges|
185|FUNC|vkFreeCommandBuffers|
186|FUNC|vkFreeDescriptorSets|
187|FUNC|vkFreeMemory|
188|FUNC|vkGetBufferDeviceAddress|
189|FUNC|vkGetBufferMemoryRequirements|
190|FUNC|vkGetBufferMemoryRequirements2|
191|FUNC|vkGetBufferOpaqueCaptureAddress|
192|FUNC|vkGetDescriptorSetLayoutSupport|
193|FUNC|vkGetDeviceBufferMemoryRequirements|
194|FUNC|vkGetDeviceGroupPeerMemoryFeatures|
195|FUNC|vkGetDeviceGroupPresentCapabilitiesKHR|
196|FUNC|vkGetDeviceGroupSurfacePresentModesKHR|
197|FUNC|vkGetDeviceImageMemoryRequirements|
198|FUNC|vkGetDeviceImageSparseMemoryRequirements|
199|FUNC|vkGetDeviceImageSubresourceLayout|
200|FUNC|vkGetDeviceMemoryCommitment|
201|FUNC|vkGetDeviceMemoryOpaqueCaptureAddress|
202|FUNC|vkGetDeviceProcAddr|
203|FUNC|vkGetDeviceQueue|
204|FUNC|vkGetDeviceQueue2|
205|FUNC|vkGetDisplayModeProperties2KHR|
206|FUNC|vkGetDisplayModePropertiesKHR|
207|FUNC|vkGetDisplayPlaneCapabilities2KHR|
208|FUNC|vkGetDisplayPlaneCapabilitiesKHR|
209|FUNC|vkGetDisplayPlaneSupportedDisplaysKHR|
210|FUNC|vkGetEventStatus|
211|FUNC|vkGetFenceStatus|
212|FUNC|vkGetImageMemoryRequirements|
213|FUNC|vkGetImageMemoryRequirements2|
214|FUNC|vkGetImageSparseMemoryRequirements|
215|FUNC|vkGetImageSparseMemoryRequirements2|
216|FUNC|vkGetImageSubresourceLayout|
217|FUNC|vkGetImageSubresourceLayout2|
218|FUNC|vkGetInstanceProcAddr|
219|FUNC|vkGetPhysicalDeviceDisplayPlaneProperties2KHR|
220|FUNC|vkGetPhysicalDeviceDisplayPlanePropertiesKHR|
221|FUNC|vkGetPhysicalDeviceDisplayProperties2KHR|
222|FUNC|vkGetPhysicalDeviceDisplayPropertiesKHR|
223|FUNC|vkGetPhysicalDeviceExternalBufferProperties|
224|FUNC|vkGetPhysicalDeviceExternalFenceProperties|
225|FUNC|vkGetPhysicalDeviceExternalSemaphoreProperties|
226|FUNC|vkGetPhysicalDeviceFeatures|
227|FUNC|vkGetPhysicalDeviceFeatures2|
228|FUNC|vkGetPhysicalDeviceFormatProperties|
229|FUNC|vkGetPhysicalDeviceFormatProperties2|
230|FUNC|vkGetPhysicalDeviceImageFormatProperties|
231|FUNC|vkGetPhysicalDeviceImageFormatProperties2|
232|FUNC|vkGetPhysicalDeviceMemoryProperties|
233|FUNC|vkGetPhysicalDeviceMemoryProperties2|
234|FUNC|vkGetPhysicalDevicePresentRectanglesKHR|
235|FUNC|vkGetPhysicalDeviceProperties|
236|FUNC|vkGetPhysicalDeviceProperties2|
237|FUNC|vkGetPhysicalDeviceQueueFamilyProperties|
238|FUNC|vkGetPhysicalDeviceQueueFamilyProperties2|
239|FUNC|vkGetPhysicalDeviceSparseImageFormatProperties|
240|FUNC|vkGetPhysicalDeviceSparseImageFormatProperties2|
241|FUNC|vkGetPhysicalDeviceSurfaceCapabilities2KHR|
242|FUNC|vkGetPhysicalDeviceSurfaceCapabilitiesKHR|
243|FUNC|vkGetPhysicalDeviceSurfaceFormats2KHR|
244|FUNC|vkGetPhysicalDeviceSurfaceFormatsKHR|
245|FUNC|vkGetPhysicalDeviceSurfacePresentModesKHR|
246|FUNC|vkGetPhysicalDeviceSurfaceSupportKHR|
247|FUNC|vkGetPhysicalDeviceToolProperties|
248|FUNC|vkGetPipelineCacheData|
249|FUNC|vkGetPrivateData|
250|FUNC|vkGetQueryPoolResults|
251|FUNC|vkGetRenderAreaGranularity|
252|FUNC|vkGetRenderingAreaGranularity|
253|FUNC|vkGetSemaphoreCounterValue|
254|FUNC|vkGetSwapchainImagesKHR|
255|FUNC|vkInvalidateMappedMemoryRanges|
256|FUNC|vkMapMemory|
257|FUNC|vkMapMemory2|
258|FUNC|vkMergePipelineCaches|
259|FUNC|vkQueueBindSparse|
260|FUNC|vkQueuePresentKHR|
261|FUNC|vkQueueSubmit|
262|FUNC|vkQueueSubmit2|
263|FUNC|vkQueueWaitIdle|
264|FUNC|vkResetCommandBuffer|
265|FUNC|vkResetCommandPool|
266|FUNC|vkResetDescriptorPool|
267|FUNC|vkResetEvent|
268|FUNC|vkResetFences|
269|FUNC|vkResetQueryPool|
270|FUNC|vkSetEvent|
271|FUNC|vkSetPrivateData|
272|FUNC|vkSignalSemaphore|
273|FUNC|vkTransitionImageLayout|
274|FUNC|vkTrimCommandPool|
275|FUNC|vkUnmapMemory|
276|FUNC|vkUnmapMemory2|
277|FUNC|vkUpdateDescriptorSets|
278|FUNC|vkUpdateDescriptorSetWithTemplate|
279|FUNC|vkWaitForFences|
280|FUNC|vkWaitSemaphores|
281
282## OpenHarmony新增的扩展接口列表
283
284除了标准能力,还提供了OpenHarmony平台扩展的Vulkan能力,扩展了使用OHNativeWindow创建Vulkan Surface的能力,以及获取OH_NativeBuffer和OH_NativeBuffer属性的能力。
285
286|符号类型|符号名|
287| --- | --- |
288|FUNC|vkCreateSurfaceOHOS|
289|FUNC|vkGetNativeBufferPropertiesOHOS|
290|FUNC|vkGetMemoryNativeBufferOHOS|
291|FUNC|vkGetSwapchainGrallocUsageOHOS|
292|FUNC|vkAcquireImageOHOS|
293|FUNC|vkQueueSignalReleaseImageOHOS|
294
295新增接口的详细介绍请见[Vulkan模块](capi-vulkan.md)。