# Vulkan支持能力

Vulkan是一套2D和3D绘图应用程序接口，具有跨平台、高性能的特点。HarmonyOS SDK 现已支持Vulkan v1.4.309版本接口，具体可用版本取决于GPU驱动实现。

#### 支持的标准库接口列表

支持Vulkan v1.4.309版本的部分接口能力，具体请见下表。

| 符号类型 | 符号名 |
| --- | --- |
| FUNC | vkAcquireNextImage2KHR |
| FUNC | vkAcquireNextImageKHR |
| FUNC | vkAllocateCommandBuffers |
| FUNC | vkAllocateDescriptorSets |
| FUNC | vkAllocateMemory |
| FUNC | vkBeginCommandBuffer |
| FUNC | vkBindBufferMemory |
| FUNC | vkBindBufferMemory2 |
| FUNC | vkBindImageMemory |
| FUNC | vkBindImageMemory2 |
| FUNC | vkCmdBeginQuery |
| FUNC | vkCmdBeginRendering |
| FUNC | vkCmdBeginRenderPass |
| FUNC | vkCmdBeginRenderPass2 |
| FUNC | vkCmdBindDescriptorSets |
| FUNC | vkCmdBindDescriptorSets2 |
| FUNC | vkCmdBindIndexBuffer |
| FUNC | vkCmdBindIndexBuffer2 |
| FUNC | vkCmdBindPipeline |
| FUNC | vkCmdBindVertexBuffers |
| FUNC | vkCmdBindVertexBuffers2 |
| FUNC | vkCmdBlitImage |
| FUNC | vkCmdBlitImage2 |
| FUNC | vkCmdClearAttachments |
| FUNC | vkCmdClearColorImage |
| FUNC | vkCmdClearDepthStencilImage |
| FUNC | vkCmdCopyBuffer |
| FUNC | vkCmdCopyBuffer2 |
| FUNC | vkCmdCopyBufferToImage |
| FUNC | vkCmdCopyBufferToImage2 |
| FUNC | vkCmdCopyImage |
| FUNC | vkCmdCopyImage2 |
| FUNC | vkCmdCopyImageToBuffer |
| FUNC | vkCmdCopyImageToBuffer2 |
| FUNC | vkCmdCopyQueryPoolResults |
| FUNC | vkCmdDispatch |
| FUNC | vkCmdDispatchBase |
| FUNC | vkCmdDispatchIndirect |
| FUNC | vkCmdDraw |
| FUNC | vkCmdDrawIndexed |
| FUNC | vkCmdDrawIndexedIndirect |
| FUNC | vkCmdDrawIndexedIndirectCount |
| FUNC | vkCmdDrawIndirect |
| FUNC | vkCmdDrawIndirectCount |
| FUNC | vkCmdEndQuery |
| FUNC | vkCmdEndRendering |
| FUNC | vkCmdEndRenderPass |
| FUNC | vkCmdEndRenderPass2 |
| FUNC | vkCmdExecuteCommands |
| FUNC | vkCmdFillBuffer |
| FUNC | vkCmdNextSubpass |
| FUNC | vkCmdNextSubpass2 |
| FUNC | vkCmdPipelineBarrier |
| FUNC | vkCmdPipelineBarrier2 |
| FUNC | vkCmdPushConstants |
| FUNC | vkCmdPushConstants2 |
| FUNC | vkCmdPushDescriptorSet |
| FUNC | vkCmdPushDescriptorSet2 |
| FUNC | vkCmdPushDescriptorSetWithTemplate |
| FUNC | vkCmdPushDescriptorSetWithTemplate2 |
| FUNC | vkCmdResetEvent |
| FUNC | vkCmdResetEvent2 |
| FUNC | vkCmdResetQueryPool |
| FUNC | vkCmdResolveImage |
| FUNC | vkCmdResolveImage2 |
| FUNC | vkCmdSetBlendConstants |
| FUNC | vkCmdSetCullMode |
| FUNC | vkCmdSetDepthBias |
| FUNC | vkCmdSetDepthBiasEnable |
| FUNC | vkCmdSetDepthBounds |
| FUNC | vkCmdSetDepthBoundsTestEnable |
| FUNC | vkCmdSetDepthCompareOp |
| FUNC | vkCmdSetDepthTestEnable |
| FUNC | vkCmdSetDepthWriteEnable |
| FUNC | vkCmdSetDeviceMask |
| FUNC | vkCmdSetEvent |
| FUNC | vkCmdSetEvent2 |
| FUNC | vkCmdSetFrontFace |
| FUNC | vkCmdSetLineStipple |
| FUNC | vkCmdSetLineWidth |
| FUNC | vkCmdSetPrimitiveRestartEnable |
| FUNC | vkCmdSetPrimitiveTopology |
| FUNC | vkCmdSetRasterizerDiscardEnable |
| FUNC | vkCmdSetRenderingAttachmentLocations |
| FUNC | vkCmdSetRenderingInputAttachmentIndices |
| FUNC | vkCmdSetScissor |
| FUNC | vkCmdSetScissorWithCount |
| FUNC | vkCmdSetStencilCompareMask |
| FUNC | vkCmdSetStencilOp |
| FUNC | vkCmdSetStencilReference |
| FUNC | vkCmdSetStencilTestEnable |
| FUNC | vkCmdSetStencilWriteMask |
| FUNC | vkCmdSetViewport |
| FUNC | vkCmdSetViewportWithCount |
| FUNC | vkCmdUpdateBuffer |
| FUNC | vkCmdWaitEvents |
| FUNC | vkCmdWaitEvents2 |
| FUNC | vkCmdWriteTimestamp |
| FUNC | vkCmdWriteTimestamp2 |
| FUNC | vkCopyImageToImage |
| FUNC | vkCopyImageToMemory |
| FUNC | vkCopyMemoryToImage |
| FUNC | vkCreateBuffer |
| FUNC | vkCreateBufferView |
| FUNC | vkCreateCommandPool |
| FUNC | vkCreateComputePipelines |
| FUNC | vkCreateDescriptorPool |
| FUNC | vkCreateDescriptorSetLayout |
| FUNC | vkCreateDescriptorUpdateTemplate |
| FUNC | vkCreateDevice |
| FUNC | vkCreateDisplayModeKHR |
| FUNC | vkCreateDisplayPlaneSurfaceKHR |
| FUNC | vkCreateEvent |
| FUNC | vkCreateFence |
| FUNC | vkCreateFramebuffer |
| FUNC | vkCreateGraphicsPipelines |
| FUNC | vkCreateHeadlessSurfaceEXT |
| FUNC | vkCreateImage |
| FUNC | vkCreateImageView |
| FUNC | vkCreateInstance |
| FUNC | vkCreatePipelineCache |
| FUNC | vkCreatePipelineLayout |
| FUNC | vkCreatePrivateDataSlot |
| FUNC | vkCreateQueryPool |
| FUNC | vkCreateRenderPass |
| FUNC | vkCreateRenderPass2 |
| FUNC | vkCreateSampler |
| FUNC | vkCreateSamplerYcbcrConversion |
| FUNC | vkCreateSemaphore |
| FUNC | vkCreateShaderModule |
| FUNC | vkCreateSharedSwapchainsKHR |
| FUNC | vkCreateSwapchainKHR |
| FUNC | vkDestroyBuffer |
| FUNC | vkDestroyBufferView |
| FUNC | vkDestroyCommandPool |
| FUNC | vkDestroyDescriptorPool |
| FUNC | vkDestroyDescriptorSetLayout |
| FUNC | vkDestroyDescriptorUpdateTemplate |
| FUNC | vkDestroyDevice |
| FUNC | vkDestroyEvent |
| FUNC | vkDestroyFence |
| FUNC | vkDestroyFramebuffer |
| FUNC | vkDestroyImage |
| FUNC | vkDestroyImageView |
| FUNC | vkDestroyInstance |
| FUNC | vkDestroyPipeline |
| FUNC | vkDestroyPipelineCache |
| FUNC | vkDestroyPipelineLayout |
| FUNC | vkDestroyPrivateDataSlot |
| FUNC | vkDestroyQueryPool |
| FUNC | vkDestroyRenderPass |
| FUNC | vkDestroySampler |
| FUNC | vkDestroySamplerYcbcrConversion |
| FUNC | vkDestroySemaphore |
| FUNC | vkDestroyShaderModule |
| FUNC | vkDestroySurfaceKHR |
| FUNC | vkDestroySwapchainKHR |
| FUNC | vkDeviceWaitIdle |
| FUNC | vkEndCommandBuffer |
| FUNC | vkEnumerateDeviceExtensionProperties |
| FUNC | vkEnumerateDeviceLayerProperties |
| FUNC | vkEnumerateInstanceExtensionProperties |
| FUNC | vkEnumerateInstanceLayerProperties |
| FUNC | vkEnumerateInstanceVersion |
| FUNC | vkEnumeratePhysicalDeviceGroups |
| FUNC | vkEnumeratePhysicalDevices |
| FUNC | vkFlushMappedMemoryRanges |
| FUNC | vkFreeCommandBuffers |
| FUNC | vkFreeDescriptorSets |
| FUNC | vkFreeMemory |
| FUNC | vkGetBufferDeviceAddress |
| FUNC | vkGetBufferMemoryRequirements |
| FUNC | vkGetBufferMemoryRequirements2 |
| FUNC | vkGetBufferOpaqueCaptureAddress |
| FUNC | vkGetDescriptorSetLayoutSupport |
| FUNC | vkGetDeviceBufferMemoryRequirements |
| FUNC | vkGetDeviceGroupPeerMemoryFeatures |
| FUNC | vkGetDeviceGroupPresentCapabilitiesKHR |
| FUNC | vkGetDeviceGroupSurfacePresentModesKHR |
| FUNC | vkGetDeviceImageMemoryRequirements |
| FUNC | vkGetDeviceImageSparseMemoryRequirements |
| FUNC | vkGetDeviceImageSubresourceLayout |
| FUNC | vkGetDeviceMemoryCommitment |
| FUNC | vkGetDeviceMemoryOpaqueCaptureAddress |
| FUNC | vkGetDeviceProcAddr |
| FUNC | vkGetDeviceQueue |
| FUNC | vkGetDeviceQueue2 |
| FUNC | vkGetDisplayModeProperties2KHR |
| FUNC | vkGetDisplayModePropertiesKHR |
| FUNC | vkGetDisplayPlaneCapabilities2KHR |
| FUNC | vkGetDisplayPlaneCapabilitiesKHR |
| FUNC | vkGetDisplayPlaneSupportedDisplaysKHR |
| FUNC | vkGetEventStatus |
| FUNC | vkGetFenceStatus |
| FUNC | vkGetImageMemoryRequirements |
| FUNC | vkGetImageMemoryRequirements2 |
| FUNC | vkGetImageSparseMemoryRequirements |
| FUNC | vkGetImageSparseMemoryRequirements2 |
| FUNC | vkGetImageSubresourceLayout |
| FUNC | vkGetImageSubresourceLayout2 |
| FUNC | vkGetInstanceProcAddr |
| FUNC | vkGetPhysicalDeviceDisplayPlaneProperties2KHR |
| FUNC | vkGetPhysicalDeviceDisplayPlanePropertiesKHR |
| FUNC | vkGetPhysicalDeviceDisplayProperties2KHR |
| FUNC | vkGetPhysicalDeviceDisplayPropertiesKHR |
| FUNC | vkGetPhysicalDeviceExternalBufferProperties |
| FUNC | vkGetPhysicalDeviceExternalFenceProperties |
| FUNC | vkGetPhysicalDeviceExternalSemaphoreProperties |
| FUNC | vkGetPhysicalDeviceFeatures |
| FUNC | vkGetPhysicalDeviceFeatures2 |
| FUNC | vkGetPhysicalDeviceFormatProperties |
| FUNC | vkGetPhysicalDeviceFormatProperties2 |
| FUNC | vkGetPhysicalDeviceImageFormatProperties |
| FUNC | vkGetPhysicalDeviceImageFormatProperties2 |
| FUNC | vkGetPhysicalDeviceMemoryProperties |
| FUNC | vkGetPhysicalDeviceMemoryProperties2 |
| FUNC | vkGetPhysicalDevicePresentRectanglesKHR |
| FUNC | vkGetPhysicalDeviceProperties |
| FUNC | vkGetPhysicalDeviceProperties2 |
| FUNC | vkGetPhysicalDeviceQueueFamilyProperties |
| FUNC | vkGetPhysicalDeviceQueueFamilyProperties2 |
| FUNC | vkGetPhysicalDeviceSparseImageFormatProperties |
| FUNC | vkGetPhysicalDeviceSparseImageFormatProperties2 |
| FUNC | vkGetPhysicalDeviceSurfaceCapabilities2KHR |
| FUNC | vkGetPhysicalDeviceSurfaceCapabilitiesKHR |
| FUNC | vkGetPhysicalDeviceSurfaceFormats2KHR |
| FUNC | vkGetPhysicalDeviceSurfaceFormatsKHR |
| FUNC | vkGetPhysicalDeviceSurfacePresentModesKHR |
| FUNC | vkGetPhysicalDeviceSurfaceSupportKHR |
| FUNC | vkGetPhysicalDeviceToolProperties |
| FUNC | vkGetPipelineCacheData |
| FUNC | vkGetPrivateData |
| FUNC | vkGetQueryPoolResults |
| FUNC | vkGetRenderAreaGranularity |
| FUNC | vkGetRenderingAreaGranularity |
| FUNC | vkGetSemaphoreCounterValue |
| FUNC | vkGetSwapchainImagesKHR |
| FUNC | vkInvalidateMappedMemoryRanges |
| FUNC | vkMapMemory |
| FUNC | vkMapMemory2 |
| FUNC | vkMergePipelineCaches |
| FUNC | vkQueueBindSparse |
| FUNC | vkQueuePresentKHR |
| FUNC | vkQueueSubmit |
| FUNC | vkQueueSubmit2 |
| FUNC | vkQueueWaitIdle |
| FUNC | vkResetCommandBuffer |
| FUNC | vkResetCommandPool |
| FUNC | vkResetDescriptorPool |
| FUNC | vkResetEvent |
| FUNC | vkResetFences |
| FUNC | vkResetQueryPool |
| FUNC | vkSetEvent |
| FUNC | vkSetPrivateData |
| FUNC | vkSignalSemaphore |
| FUNC | vkTransitionImageLayout |
| FUNC | vkTrimCommandPool |
| FUNC | vkUnmapMemory |
| FUNC | vkUnmapMemory2 |
| FUNC | vkUpdateDescriptorSets |
| FUNC | vkUpdateDescriptorSetWithTemplate |
| FUNC | vkWaitForFences |
| FUNC | vkWaitSemaphores |

#### HarmonyOS新增的扩展接口列表

除了标准能力，还提供了HarmonyOS平台扩展的Vulkan能力，扩展了使用OHNativeWindow创建Vulkan Surface的能力，以及获取OH\_NativeBuffer和OH\_NativeBuffer属性的能力。

| 符号类型 | 符号名 |
| --- | --- |
| FUNC | vkCreateSurfaceOHOS |
| FUNC | vkGetNativeBufferPropertiesOHOS |
| FUNC | vkGetMemoryNativeBufferOHOS |
| FUNC | vkGetSwapchainGrallocUsageOHOS |
| FUNC | vkAcquireImageOHOS |
| FUNC | vkQueueSignalReleaseImageOHOS |

新增接口的详细介绍请见Vulkan模块。