diff --git a/BUILD.gn b/BUILD.gn index be36117..28e0ae0 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -27,7 +27,7 @@ config("vulkan_headers_config") { defines = [] if (is_ohos) { - defines += [ "VK_USE_PLATFORM_OHOS_OPENHARMONY" ] + defines += [ "VK_USE_PLATFORM_OHOS" ] } if (is_win) { diff --git a/README_OpenHarmony.md b/README_OpenHarmony.md index 83a7cdf..6265869 100644 --- a/README_OpenHarmony.md +++ b/README_OpenHarmony.md @@ -22,23 +22,23 @@ Vulkan Loader 会提供标准 Vulkan API 函数符号、OpenHarmony WSI扩展的 Vulkan-Loader成功加载Vulkan驱动程序的必要条件 1.要参考[LoaderDriverInterface](https://gitee.com/openharmony/third_party_vulkan-loader/blob/master/docs/LoaderDriverInterface.md)实现对应的接口; 2.提供驱动程序描述json文件,参考[加载GPU驱动](https://gitee.com/openharmony/third_party_vulkan-loader/blob/master/README_OpenHarmony.md#%E5%8A%A0%E8%BD%BDgpu%E9%A9%B1%E5%8A%A8); - 3.实现OpenHarmony平台的扩展包括`VK_OHOS_native_buffer`和`VK_OpenHarmony_external_memory_OHOS_native_buffer`扩展。 + 3.实现OpenHarmony平台的扩展包括`VK_OHOS_native_buffer`和`VK_OHOS_external_memory`扩展。 ## 北向应用开发者 -### VK_OpenHarmony_OHOS_surface 扩展 +### VK_OHOS_surface 扩展 - 接口:vkCreateOHOSSurfaceOpenHarmony - VkResult vkCreateOHOSSurfaceOpenHarmony( + 接口:vkCreateSurfaceOHOS + VkResult vkCreateSurfaceOHOS( VkInstance instance, - const VkOHOSSurfaceCreateInfoOpenHarmony pCreateInfo, + const VkSurfaceCreateInfoOHOS pCreateInfo, const VkAllocationCallbacks pAllocator, VkSurfaceKHR pSurface) 参数: instance是要关联Surface的实例。 - pCreateInfo是一个指向结构的指针,该VkOHOSSurfaceCreateInfoOpenHarmony 结构包含影响表面对象创建的参数。 + pCreateInfo是一个指向结构的指针,该VkSurfaceCreateInfoOHOS 结构包含影响表面对象创建的参数。 pAllocator是用于在没有更多特定内存分配器可用时做为Surface对象分配的分配器。 pSurface是一个指向VkSurfaceKHR句柄的指针,在该句柄中返回创建的Surface对象。 diff --git a/include/vulkan/vk_icd.h b/include/vulkan/vk_icd.h index bff6269..fb57eb2 100644 --- a/include/vulkan/vk_icd.h +++ b/include/vulkan/vk_icd.h @@ -123,7 +123,7 @@ typedef enum { VK_ICD_WSI_PLATFORM_VI, VK_ICD_WSI_PLATFORM_GGP, VK_ICD_WSI_PLATFORM_SCREEN, - VK_ICD_WSI_PLATFORM_OPENHARMONY, + VK_ICD_WSI_PLATFORM_OHOS, } VkIcdWsiPlatform; typedef struct { @@ -243,10 +243,10 @@ typedef struct { } VkIcdSurfaceScreen; #endif // VK_USE_PLATFORM_SCREEN_QNX -#ifdef VK_USE_PLATFORM_OHOS_OPENHARMONY +#ifdef VK_USE_PLATFORM_OHOS typedef struct { VkIcdSurfaceBase base; struct NativeWindow *window; -} VkIcdSurfaceOpenHarmony; -#endif // VK_USE_PLATFORM_OHOS_OPENHARMONY +} VkIcdSurfaceOHOS; +#endif // VK_USE_PLATFORM_OHOS #endif // VKICD_H diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 85df4bc..03e46a3 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -84,13 +84,12 @@ #include "vulkan_screen.h" #endif -#ifdef VK_USE_PLATFORM_OHOS_OPENHARMONY -#include "buffer_handle.h" -#include "vulkan_ohos.h" -#endif - #ifdef VK_ENABLE_BETA_EXTENSIONS #include "vulkan_beta.h" #endif +#ifdef VK_USE_PLATFORM_OHOS +#include "vulkan_ohos.h" +#endif + #endif // VULKAN_H_ diff --git a/include/vulkan/vulkan.hpp b/include/vulkan/vulkan.hpp index d6e6a7b..707e69e 100644 --- a/include/vulkan/vulkan.hpp +++ b/include/vulkan/vulkan.hpp @@ -2991,17 +2991,17 @@ namespace VULKAN_HPP_NAMESPACE } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ -# if defined( VK_USE_PLATFORM_OHOS_OPENHARMONY ) - //=== VK_OpenHarmony_OHOS_surface === +# if defined( VK_USE_PLATFORM_OHOS ) + //=== VK_OHOS_surface === - VkResult vkCreateOHOSSurfaceOpenHarmony(VkInstance instance, - const VkOHOSSurfaceCreateInfoOpenHarmony * pCreateInfo, + VkResult vkCreateSurfaceOHOS(VkInstance instance, + const VkSurfaceCreateInfoOHOS * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { - return ::vkCreateOHOSSurfaceOpenHarmony( instance, pCreateInfo, pAllocator, pSurface ); + return ::vkCreateSurfaceOHOS( instance, pCreateInfo, pAllocator, pSurface ); } -# endif /*VK_USE_PLATFORM_OHOS_OPENHARMONY*/ +# endif /*VK_USE_PLATFORM_OHOS*/ //=== VK_EXT_debug_report === @@ -12413,12 +12413,12 @@ namespace VULKAN_HPP_NAMESPACE PFN_dummy vkGetPhysicalDeviceWin32PresentationSupportKHR_placeholder = 0; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#if defined( VK_USE_PLATFORM_OHOS_OPENHARMONY ) - //=== VK_OpenHarmony_OHOS_surface === - PFN_vkCreateOHOSSurfaceOpenHarmony vkCreateOHOSSurfaceOpenHarmony = 0; +#if defined( VK_USE_PLATFORM_OHOS ) + //=== VK_OHOS_surface === + PFN_vkCreateSurfaceOHOS vkCreateSurfaceOHOS = 0; #else - PFN_dummy vkCreateOHOSSurfaceOpenHarmony_placeholder = 0; -#endif /*VK_USE_PLATFORM_OHOS_OPENHARMONY*/ + PFN_dummy vkCreateSurfaceOHOS_placeholder = 0; +#endif /*VK_USE_PLATFORM_OHOS*/ //=== VK_EXT_debug_report === PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = 0; @@ -13518,11 +13518,11 @@ namespace VULKAN_HPP_NAMESPACE PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR" ) ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#if defined( VK_USE_PLATFORM_OHOS_OPENHARMONY ) - //=== VK_OpenHarmony_OHOS_surface === - vkCreateOHOSSurfaceOpenHarmony = - PFN_vkCreateOHOSSurfaceOpenHarmony( vkGetInstanceProcAddr( instance, "vkCreateOHOSSurfaceOpenHarmony" ) ); -#endif /*VK_USE_PLATFORM_OHOS_OPENHARMONY*/ +#if defined( VK_USE_PLATFORM_OHOS ) + //=== VK_OHOS_surface === + vkCreateSurfaceOHOS = + PFN_vkCreateSurfaceOHOS( vkGetInstanceProcAddr( instance, "vkCreateSurfaceOHOS" ) ); +#endif /*VK_USE_PLATFORM_OHOS*/ //=== VK_EXT_debug_report === vkCreateDebugReportCallbackEXT = PFN_vkCreateDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugReportCallbackEXT" ) ); diff --git a/include/vulkan/vulkan_core.h b/include/vulkan/vulkan_core.h index e1ea22d..e913fa4 100644 --- a/include/vulkan/vulkan_core.h +++ b/include/vulkan/vulkan_core.h @@ -422,16 +422,6 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES = 1000413001, VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS = 1000413002, VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS = 1000413003, - VK_STRUCTURE_TYPE_OHOS_SURFACE_CREATE_INFO_OPENHARMONY = 1000451000, - VK_STRUCTURE_TYPE_OHOS_NATIVE_BUFFER_USAGE_OPENHARMONY = 1000452000, - VK_STRUCTURE_TYPE_OHOS_NATIVE_BUFFER_PROPERTIES_OPENHARMONY = 1000452001, - VK_STRUCTURE_TYPE_OHOS_NATIVE_BUFFER_FORMAT_PROPERTIES_OPENHARMONY = 1000452002, - VK_STRUCTURE_TYPE_IMPORT_OHOS_NATIVE_BUFFER_INFO_OPENHARMONY = 1000452003, - VK_STRUCTURE_TYPE_MEMORY_GET_OHOS_NATIVE_BUFFER_INFO_OPENHARMONY = 1000452004, - VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_OPENHARMONY = 1000452005, - VK_STRUCTURE_TYPE_NATIVE_BUFFER_OPENHARMONY = 1000453001, - VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_OPENHARMONY = 1000453002, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_OPENHARMONY = 1000453003, VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000, VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001, VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007, @@ -1054,6 +1044,16 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT = 1000351002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM = 1000497000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM = 1000497001, + VK_STRUCTURE_TYPE_SURFACE_CREATE_INFO_OHOS = 1000451000, + VK_STRUCTURE_TYPE_NATIVE_BUFFER_OHOS = 1000453001, + VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_OHOS = 1000453002, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_OHOS = 1000453003, + VK_STRUCTURE_TYPE_NATIVE_BUFFER_USAGE_OHOS = 1000452000, + VK_STRUCTURE_TYPE_NATIVE_BUFFER_PROPERTIES_OHOS = 1000452001, + VK_STRUCTURE_TYPE_NATIVE_BUFFER_FORMAT_PROPERTIES_OHOS = 1000452002, + VK_STRUCTURE_TYPE_IMPORT_NATIVE_BUFFER_INFO_OHOS = 1000452003, + VK_STRUCTURE_TYPE_MEMORY_GET_NATIVE_BUFFER_INFO_OHOS = 1000452004, + VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_OHOS = 1000452005, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES, VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, @@ -4936,7 +4936,7 @@ typedef enum VkExternalMemoryHandleTypeFlagBits { VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 0x00000100, VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA = 0x00000800, VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV = 0x00001000, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_OHOS_NATIVE_BUFFER_BIT_OPENHARMONY = 0x00002000, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_OHOS_NATIVE_BUFFER_BIT_OHOS = 0x00002000, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, diff --git a/include/vulkan/vulkan_enums.hpp b/include/vulkan/vulkan_enums.hpp index aae6107..ac5b4c5 100644 --- a/include/vulkan/vulkan_enums.hpp +++ b/include/vulkan/vulkan_enums.hpp @@ -3078,10 +3078,10 @@ namespace VULKAN_HPP_NAMESPACE }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#if defined( VK_USE_PLATFORM_OHOS_OPENHARMONY ) - //=== VK_OpenHarmony_ohos_surface === +#if defined( VK_USE_PLATFORM_OHOS ) + //=== VK_OHOS_surface === - enum class OHOSSurfaceCreateFlagsBitsOpenHarmony : VkOHOSSurfaceCreateFlagsOpenHarmony + enum class OHOSSurfaceCreateFlagsBitsOpenHarmony : VkSurfaceCreateFlagsOHOS { }; @@ -3089,7 +3089,7 @@ namespace VULKAN_HPP_NAMESPACE { return "(void)"; } -#endif /*VK_USE_PLATFORM_OHOS_OPENHARMONY*/ +#endif /*VK_USE_PLATFORM_OHOS*/ //=== VK_EXT_debug_report === @@ -5915,16 +5915,16 @@ namespace VULKAN_HPP_NAMESPACE using Win32SurfaceCreateFlagsKHR = Flags; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#if defined( VK_USE_PLATFORM_OHOS_OPENHARMONY ) - //=== VK_OpenHarmony_OHOS_surface === +#if defined( VK_USE_PLATFORM_OHOS ) + //=== VK_OHOS_surface === - using OHOSSurfaceCreateFlagsOpenHarmony = Flags; + using SurfaceCreateFlagsOHOS = Flags; - VULKAN_HPP_INLINE std::string to_string( OHOSSurfaceCreateFlagsOpenHarmony ) + VULKAN_HPP_INLINE std::string to_string( SurfaceCreateFlagsOHOS ) { return "{}"; } -#endif /*VK_USE_PLATFORM_OHOS_OPENHARMONY*/ +#endif /*VK_USE_PLATFORM_OHOS*/ //=== VK_EXT_debug_report === diff --git a/include/vulkan/vulkan_funcs.hpp b/include/vulkan/vulkan_funcs.hpp index 3cfe1c9..9037c00 100644 --- a/include/vulkan/vulkan_funcs.hpp +++ b/include/vulkan/vulkan_funcs.hpp @@ -9042,20 +9042,20 @@ namespace VULKAN_HPP_NAMESPACE } #endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#if defined( VK_USE_PLATFORM_OHOS_OPENHARMONY ) - //=== VK_OpenHarmony_OHOS_surface === +#if defined( VK_USE_PLATFORM_OHOS ) + //=== VK_OHOS_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result - Instance::createOHOSSurfaceOpenHarmony( const VULKAN_HPP_NAMESPACE::OHOSSurfaceCreateInfoOpenHarmony * pCreateInfo, + Instance::createSurfaceOHOS( const VULKAN_HPP_NAMESPACE::SurfaceCreateInfoOHOS * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( - d.vkCreateOHOSSurfaceOpenHarmony( m_instance, - reinterpret_cast( pCreateInfo ), + d.vkCreateSurfaceOHOS( m_instance, + reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } @@ -9064,44 +9064,44 @@ namespace VULKAN_HPP_NAMESPACE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type - Instance::createOHOSSurfaceOpenHarmony( const VULKAN_HPP_NAMESPACE::OHOSSurfaceCreateInfoOpenHarmony & createInfo, + Instance::createSurfaceOHOS( const VULKAN_HPP_NAMESPACE::SurfaceCreateInfoOHOS & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; Result result = static_cast( - d.vkCreateOHOSSurfaceOpenHarmony( m_instance, - reinterpret_cast( &createInfo ), + d.vkCreateSurfaceOHOS( m_instance, + reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING "::Instance::createOHOSSurfaceOpenHarmony" ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING "::Instance::createSurfaceOHOS" ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType>::type - Instance::createOHOSSurfaceOpenHarmonyUnique( const VULKAN_HPP_NAMESPACE::OHOSSurfaceCreateInfoOpenHarmony & createInfo, + Instance::createSurfaceOHOSUnique( const VULKAN_HPP_NAMESPACE::SurfaceCreateInfoOHOS & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; Result result = static_cast( - d.vkCreateOHOSSurfaceOpenHarmony( m_instance, - reinterpret_cast( &createInfo ), + d.vkCreateSurfaceOHOS( m_instance, + reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); ObjectDestroy deleter( *this, allocator, d ); return createResultValue( - result, surface, VULKAN_HPP_NAMESPACE_STRING "::Instance::createOHOSSurfaceOpenHarmonyUnique", deleter ); + result, surface, VULKAN_HPP_NAMESPACE_STRING "::Instance::createSurfaceOHOSUnique", deleter ); } # endif /*VULKAN_HPP_NO_SMART_HANDLE*/ # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_OHOS_OPENHARMONY*/ +#endif /*VK_USE_PLATFORM_OHOS*/ //=== VK_EXT_debug_report === diff --git a/include/vulkan/vulkan_handles.hpp b/include/vulkan/vulkan_handles.hpp index 4e5bb25..d82677b 100644 --- a/include/vulkan/vulkan_handles.hpp +++ b/include/vulkan/vulkan_handles.hpp @@ -520,10 +520,10 @@ namespace VULKAN_HPP_NAMESPACE struct Win32SurfaceCreateInfoKHR; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#if defined( VK_USE_PLATFORM_OHOS_OPENHARMONY ) - //=== VK_OpenHarmony_OHOS_surface === - struct OHOSSurfaceCreateInfoOpenHarmony; -#endif /*VK_USE_PLATFORM_OHOS_OPENHARMONY*/ +#if defined( VK_USE_PLATFORM_OHOS ) + //=== VK_OHOS_surface === + struct SurfaceCreateInfoOHOS; +#endif /*VK_USE_PLATFORM_OHOS*/ //=== VK_EXT_debug_report === struct DebugReportCallbackCreateInfoEXT; @@ -13836,19 +13836,19 @@ namespace VULKAN_HPP_NAMESPACE # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#if defined( VK_USE_PLATFORM_OHOS_OPENHARMONY ) - //=== VK_OpenHarmony_OHOS_surface === +#if defined( VK_USE_PLATFORM_OHOS ) + //=== VK_OHOS_surface === template VULKAN_HPP_NODISCARD Result - createOHOSSurfaceOpenHarmony( const VULKAN_HPP_NAMESPACE::OHOSSurfaceCreateInfoOpenHarmony * pCreateInfo, + createSurfaceOHOS( const VULKAN_HPP_NAMESPACE::SurfaceCreateInfoOHOS * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type - createOHOSSurfaceOpenHarmony( const VULKAN_HPP_NAMESPACE::OHOSSurfaceCreateInfoOpenHarmony & createInfo, + createSurfaceOHOS( const VULKAN_HPP_NAMESPACE::SurfaceCreateInfoOHOS & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -13856,13 +13856,13 @@ namespace VULKAN_HPP_NAMESPACE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType>::type - createOHOSSurfaceOpenHarmonyUnique( const VULKAN_HPP_NAMESPACE::OHOSSurfaceCreateInfoOpenHarmony & createInfo, + createSurfaceOHOSUnique( const VULKAN_HPP_NAMESPACE::SurfaceCreateInfoOHOS & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /*VULKAN_HPP_NO_SMART_HANDLE*/ # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_OHOS_OPENHARMONY*/ +#endif /*VK_USE_PLATFORM_OHOS*/ //=== VK_EXT_debug_report === diff --git a/include/vulkan/vulkan_ohos.h b/include/vulkan/vulkan_ohos.h index 7cec530..b0efb54 100644 --- a/include/vulkan/vulkan_ohos.h +++ b/include/vulkan/vulkan_ohos.h @@ -2,7 +2,7 @@ #define VULKAN_OHOS_H_ 1 /* -** Copyright 2015-2021 The Khronos Group Inc. +** Copyright 2015-2022 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ @@ -17,121 +17,104 @@ extern "C" { #endif -#define VK_OpenHarmony_OHOS_surface 1 -typedef struct NativeWindow OHNativeWindow; -#define VK_OPENHARMONY_OHOS_SURFACE_SPEC_VERSION 1 -#define VK_OPENHARMONY_OHOS_SURFACE_EXTENSION_NAME "VK_OpenHarmony_OHOS_surface" -// VK_STRUCTURE_TYPE_OHOS_SURFACE_CREATE_INFO_OPENHARMONY -typedef VkFlags VkOHOSSurfaceCreateFlagsOpenHarmony; -typedef struct VkOHOSSurfaceCreateInfoOpenHarmony { - VkStructureType sType; - const void* pNext; - VkOHOSSurfaceCreateFlagsOpenHarmony flags; - OHNativeWindow* window; -} VkOHOSSurfaceCreateInfoOpenHarmony; -typedef VkResult (VKAPI_PTR *PFN_vkCreateOHOSSurfaceOpenHarmony)(VkInstance instance, const VkOHOSSurfaceCreateInfoOpenHarmony* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); + +#define VK_OHOS_surface 1 +typedef struct NativeWindow OHNativeWindow; +#define VK_OHOS_SURFACE_SPEC_VERSION 1 +#define VK_OHOS_SURFACE_EXTENSION_NAME "VK_OHOS_surface" +typedef VkFlags VkSurfaceCreateFlagsOHOS; +typedef struct VkSurfaceCreateInfoOHOS { + VkStructureType sType; + const void* pNext; + VkSurfaceCreateFlagsOHOS flags; + OHNativeWindow* window; +} VkSurfaceCreateInfoOHOS; + +typedef VkResult (VKAPI_PTR *PFN_vkCreateSurfaceOHOS)(VkInstance instance, const VkSurfaceCreateInfoOHOS* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateOHOSSurfaceOpenHarmony( +VKAPI_ATTR VkResult VKAPI_CALL vkCreateSurfaceOHOS( VkInstance instance, - const VkOHOSSurfaceCreateInfoOpenHarmony* pCreateInfo, + const VkSurfaceCreateInfoOHOS* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #endif -#define VK_OHOS_native_buffer 1 +#define VK_OHOS_native_buffer 1 +struct OHBufferHandle; #define VK_OHOS_NATIVE_BUFFER_SPEC_VERSION 1 #define VK_OHOS_NATIVE_BUFFER_EXTENSION_NAME "VK_OHOS_native_buffer" -typedef VkFlags VkSwapchainImageUsageFlagsOpenHarmony; -typedef enum VkSwapchainImageUsageFlagBitsOpenHarmony { - VK_SWAPCHAIN_IMAGE_USAGE_SHARED_BIT_OPENHARMONY = 0x00000001, - VK_SWAPCHAIN_IMAGE_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkSwapchainImageUsageFlagBitsOpenHarmony; +typedef enum VkSwapchainImageUsageFlagBitsOHOS { + VK_SWAPCHAIN_IMAGE_USAGE_SHARED_BIT_OHOS = 0x00000001, + VK_SWAPCHAIN_IMAGE_USAGE_FLAG_BITS_MAX_ENUM_OHOS = 0x7FFFFFFF +} VkSwapchainImageUsageFlagBitsOHOS; +typedef VkFlags VkSwapchainImageUsageFlagsOHOS; +typedef struct VkNativeBufferOHOS { + VkStructureType sType; + const void* pNext; + struct OHBufferHandle* handle; +} VkNativeBufferOHOS; -typedef struct { +typedef struct VkSwapchainImageCreateInfoOHOS { VkStructureType sType; const void* pNext; - BufferHandle* handle; -} VkNativeBufferOpenHarmony; + VkSwapchainImageUsageFlagsOHOS usage; +} VkSwapchainImageCreateInfoOHOS; -typedef struct { - VkStructureType sType; - const void* pNext; - VkSwapchainImageUsageFlagsOpenHarmony usage; -} VkSwapchainImageCreateInfoOpenHarmony; +typedef struct VkPhysicalDevicePresentationPropertiesOHOS { + VkStructureType sType; + const void* pNext; + VkBool32 sharedImage; +} VkPhysicalDevicePresentationPropertiesOHOS; -typedef struct { - VkStructureType sType; - const void* pNext; - VkBool32 sharedImage; -} VkPhysicalDevicePresentationPropertiesOpenHarmony; - -typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainGrallocUsageOpenHarmony)( - VkDevice device, - VkFormat format, - VkImageUsageFlags imageUsage, - uint64_t* grallocUsage); - -typedef VkResult (VKAPI_PTR *PFN_vkSetNativeFenceFdOpenHarmony)( - VkDevice device, - int32_t nativeFenceFd, - VkSemaphore semaphore, - VkFence fence); - -typedef VkResult (VKAPI_PTR *PFN_vkGetNativeFenceFdOpenHarmony)( - VkQueue queue, - uint32_t waitSemaphoreCount, - const VkSemaphore* pWaitSemaphores, - VkImage image, - int32_t* pNativeFenceFd); +typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainGrallocUsageOHOS)(VkDevice device, VkFormat format, VkImageUsageFlags imageUsage, uint64_t* grallocUsage); +typedef VkResult (VKAPI_PTR *PFN_vkAcquireImageOHOS)(VkDevice device, VkImage image, int32_t nativeFenceFd, VkSemaphore semaphore, VkFence fence); +typedef VkResult (VKAPI_PTR *PFN_vkQueueSignalReleaseImageOHOS)(VkQueue queue, uint32_t waitSemaphoreCount, const VkSemaphore* pWaitSemaphores, VkImage image, int32_t* pNativeFenceFd); #ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainGrallocUsageOHOS( + VkDevice device, + VkFormat format, + VkImageUsageFlags imageUsage, + uint64_t* grallocUsage); -VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainGrallocUsageOpenHarmony( - VkDevice device, - VkFormat format, - VkImageUsageFlags imageUsage, - uint64_t* grallocUsage -); - -VKAPI_ATTR VkResult VKAPI_CALL vkSetNativeFenceFdOpenHarmony( - VkDevice device, - int32_t nativeFenceFd, - VkSemaphore semaphore, - VkFence fence -); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetNativeFenceFdOpenHarmony( - VkQueue queue, - uint32_t waitSemaphoreCount, - const VkSemaphore* pWaitSemaphores, - VkImage image, - int32_t* pNativeFenceFd -); +VKAPI_ATTR VkResult VKAPI_CALL vkAcquireImageOHOS( + VkDevice device, + VkImage image, + int32_t nativeFenceFd, + VkSemaphore semaphore, + VkFence fence); +VKAPI_ATTR VkResult VKAPI_CALL vkQueueSignalReleaseImageOHOS( + VkQueue queue, + uint32_t waitSemaphoreCount, + const VkSemaphore* pWaitSemaphores, + VkImage image, + int32_t* pNativeFenceFd); #endif -#define VK_OpenHarmony_external_memory_OHOS_native_buffer 1 + +#define VK_OHOS_external_memory 1 struct OH_NativeBuffer; -#define VK_OPENHARMONY_EXTERNAL_MEMORY_OHOS_NATIVE_BUFFER_SPEC_VERSION 1 -#define VK_OPENHARMONY_EXTERNAL_MEMORY_OHOS_NATIVE_BUFFER_EXTENSION_NAME "VK_OpenHarmony_external_memory_OHOS_native_buffer" -typedef struct VkOHOSNativeBufferUsageOpenHarmony { +#define VK_OHOS_EXTERNAL_MEMORY_SPEC_VERSION 1 +#define VK_OHOS_EXTERNAL_MEMORY_EXTENSION_NAME "VK_OHOS_external_memory" +typedef struct VkNativeBufferUsageOHOS { VkStructureType sType; void* pNext; uint64_t OHOSNativeBufferUsage; -} VkOHOSNativeBufferUsageOpenHarmony; +} VkNativeBufferUsageOHOS; -typedef struct VkOHOSNativeBufferPropertiesOpenHarmony { +typedef struct VkNativeBufferPropertiesOHOS { VkStructureType sType; void* pNext; VkDeviceSize allocationSize; uint32_t memoryTypeBits; -} VkOHOSNativeBufferPropertiesOpenHarmony; +} VkNativeBufferPropertiesOHOS; -typedef struct VkOHOSNativeBufferFormatPropertiesOpenHarmony { +typedef struct VkNativeBufferFormatPropertiesOHOS { VkStructureType sType; void* pNext; VkFormat format; @@ -142,42 +125,41 @@ typedef struct VkOHOSNativeBufferFormatPropertiesOpenHarmony { VkSamplerYcbcrRange suggestedYcbcrRange; VkChromaLocation suggestedXChromaOffset; VkChromaLocation suggestedYChromaOffset; -} VkOHOSNativeBufferFormatPropertiesOpenHarmony; +} VkNativeBufferFormatPropertiesOHOS; -typedef struct VkImportOHOSNativeBufferInfoOpenHarmony { +typedef struct VkImportNativeBufferInfoOHOS { VkStructureType sType; const void* pNext; struct OH_NativeBuffer* buffer; -} VkImportOHOSNativeBufferInfoOpenHarmony; +} VkImportNativeBufferInfoOHOS; -typedef struct VkMemoryGetOHOSNativeBufferInfoOpenHarmony { +typedef struct VkMemoryGetNativeBufferInfoOHOS { VkStructureType sType; const void* pNext; VkDeviceMemory memory; -} VkMemoryGetOHOSNativeBufferInfoOpenHarmony; +} VkMemoryGetNativeBufferInfoOHOS; -typedef struct VkExternalFormatOpenHarmony { +typedef struct VkExternalFormatOHOS { VkStructureType sType; void* pNext; uint64_t externalFormat; -} VkExternalFormatOpenHarmony; +} VkExternalFormatOHOS; -typedef VkResult (VKAPI_PTR *PFN_vkGetOHOSNativeBufferPropertiesOpenHarmony)(VkDevice device, const struct OH_NativeBuffer* buffer, VkOHOSNativeBufferPropertiesOpenHarmony* pProperties); -typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryOHOSNativeBufferOpenHarmony)(VkDevice device, const VkMemoryGetOHOSNativeBufferInfoOpenHarmony* pInfo, struct OH_NativeBuffer** pBuffer); +typedef VkResult (VKAPI_PTR *PFN_vkGetNativeBufferPropertiesOHOS)(VkDevice device, const struct OH_NativeBuffer* buffer, VkNativeBufferPropertiesOHOS* pProperties); +typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryNativeBufferOHOS)(VkDevice device, const VkMemoryGetNativeBufferInfoOHOS* pInfo, struct OH_NativeBuffer** pBuffer); #ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkGetOHOSNativeBufferPropertiesOpenHarmony( +VKAPI_ATTR VkResult VKAPI_CALL vkGetNativeBufferPropertiesOHOS( VkDevice device, const struct OH_NativeBuffer* buffer, - VkOHOSNativeBufferPropertiesOpenHarmony* pProperties); + VkNativeBufferPropertiesOHOS* pProperties); -VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryOHOSNativeBufferOpenHarmony( - VkDevice device, - const VkMemoryGetOHOSNativeBufferInfoOpenHarmony* pInfo, - struct OH_NativeBuffer** pBuffer); +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryNativeBufferOHOS( + VkDevice device, + const VkMemoryGetNativeBufferInfoOHOS* pInfo, + struct OH_NativeBuffer** pBuffer); #endif - #ifdef __cplusplus } #endif diff --git a/include/vulkan/vulkan_raii.hpp b/include/vulkan/vulkan_raii.hpp index 81e2aac..f728010 100644 --- a/include/vulkan/vulkan_raii.hpp +++ b/include/vulkan/vulkan_raii.hpp @@ -186,11 +186,11 @@ namespace VULKAN_HPP_NAMESPACE vkCreateAndroidSurfaceKHR = PFN_vkCreateAndroidSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateAndroidSurfaceKHR" ) ); # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ -# if defined( VK_USE_PLATFORM_OHOS_OPENHARMONY ) - //=== VK_OpenHarmony_OHOS_surface === - vkCreateOHOSSurfaceOpenHarmony = - PFN_vkCreateOHOSSurfaceOpenHarmony( vkGetInstanceProcAddr( instance, "vkCreateOHOSSurfaceOpenHarmony" ) ); -# endif /*VK_USE_PLATFORM_OHOS_OPENHARMONY*/ +# if defined( VK_USE_PLATFORM_OHOS ) + //=== VK_OHOS_surface === + vkCreateSurfaceOHOS = + PFN_vkCreateSurfaceOHOS( vkGetInstanceProcAddr( instance, "vkCreateSurfaceOHOS" ) ); +# endif /*VK_USE_PLATFORM_OHOS*/ //=== VK_KHR_device_group === vkGetPhysicalDevicePresentRectanglesKHR = @@ -494,12 +494,12 @@ namespace VULKAN_HPP_NAMESPACE PFN_dummy vkCreateAndroidSurfaceKHR_placeholder = 0; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ -# if defined( VK_USE_PLATFORM_OHOS_OPENHARMONY ) - //=== VK_OpenHarmony_OHOS_surface === - PFN_vkCreateOHOSSurfaceOpenHarmony vkCreateOHOSSurfaceOpenHarmony = 0; +# if defined( VK_USE_PLATFORM_OHOS ) + //=== VK_OHOS_surface === + PFN_vkCreateSurfaceOHOS vkCreateSurfaceOHOS = 0; # else - PFN_dummy vkCreateOHOSSurfaceOpenHarmony_placeholder = 0; -# endif /*VK_USE_PLATFORM_OHOS_OPENHARMONY*/ + PFN_dummy vkCreateSurfaceOHOS_placeholder = 0; +# endif /*VK_USE_PLATFORM_OHOS*/ //=== VK_KHR_device_group === PFN_vkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR = 0; @@ -2674,13 +2674,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ -# if defined( VK_USE_PLATFORM_OHOS_OPENHARMONY ) - //=== VK_OpenHarmony_OHOS_surface === +# if defined( VK_USE_PLATFORM_OHOS ) + //=== VK_OHOS_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR createOHOSSurfaceOpenHarmony( - VULKAN_HPP_NAMESPACE::OHOSSurfaceCreateInfoOpenHarmony const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR createSurfaceOHOS( + VULKAN_HPP_NAMESPACE::SurfaceCreateInfoOHOS const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; -# endif /*VK_USE_PLATFORM_OHOS_OPENHARMONY*/ +# endif /*VK_USE_PLATFORM_OHOS*/ //=== VK_EXT_debug_report === @@ -13303,16 +13303,16 @@ namespace VULKAN_HPP_NAMESPACE } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ -# if defined( VK_USE_PLATFORM_OHOS_OPENHARMONY ) - //=== VK_OpenHarmony_OHOS_surface === +# if defined( VK_USE_PLATFORM_OHOS ) + //=== VK_OHOS_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR Instance::createOHOSSurfaceOpenHarmony( - VULKAN_HPP_NAMESPACE::OHOSSurfaceCreateInfoOpenHarmony const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR Instance::createSurfaceOHOS( + VULKAN_HPP_NAMESPACE::SurfaceCreateInfoOHOS const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const { return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); } -# endif /*VK_USE_PLATFORM_OHOS_OPENHARMONY*/ +# endif /*VK_USE_PLATFORM_OHOS*/ //=== VK_EXT_debug_report === diff --git a/registry/genvk.py b/registry/genvk.py index 1fc8407..15fde8e 100755 --- a/registry/genvk.py +++ b/registry/genvk.py @@ -401,11 +401,12 @@ def makeGenOpts(args): 'VK_EXT_metal_objects' ], commonSuppressExtensions ], [ 'vulkan_screen.h', [ 'VK_QNX_screen_surface' ], commonSuppressExtensions ], [ 'vulkan_beta.h', betaRequireExtensions, betaSuppressExtensions ], - [ 'vulkan_ohos.h', [ 'VK_OpenHarmony_OHOS_surface', - 'VK_OpenHarmony_external_memory_ohos_native_buffer' + [ 'vulkan_ohos.h', [ 'VK_OHOS_surface', + 'VK_OHOS_external_memory', + 'VK_OHOS_native_buffer' ], commonSuppressExtensions + - [ 'VK_KHR_format_feature_flags2', - ] ], + [ 'VK_KHR_format_feature_flags2', + ] ], ] for platform in platforms: diff --git a/registry/validusage.json b/registry/validusage.json index 4720a99..9af904f 100644 --- a/registry/validusage.json +++ b/registry/validusage.json @@ -49220,42 +49220,42 @@ } ] }, - "vkCreateOHOSSurfaceOpenHarmony": { - "(VK_KHR_surface)+(VK_OpenHarmony_OHOS_surface)": [ + "vkCreateSurfaceOHOS": { + "(VK_KHR_surface)+(VK_OHOS_surface)": [ { - "vuid": "VUID-vkCreateOHOSSurfaceOpenHarmony-instance-parameter", + "vuid": "VUID-vkCreateSurfaceOHOS-instance-parameter", "text": " instance must be a valid VkInstance handle" }, { - "vuid": "VUID-vkCreateOHOSSurfaceOpenHarmony-pCreateInfo-parameter", - "text": " pCreateInfo must be a valid pointer to a valid VkOHOSSurfaceCreateInfoOpenHarmony structure" + "vuid": "VUID-vkCreateSurfaceOHOS-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkSurfaceCreateInfoOHOS structure" }, { - "vuid": "VUID-vkCreateOHOSSurfaceOpenHarmony-pAllocator-parameter", + "vuid": "VUID-vkCreateSurfaceOHOS-pAllocator-parameter", "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" }, { - "vuid": "VUID-vkCreateOHOSSurfaceOpenHarmony-pSurface-parameter", + "vuid": "VUID-vkCreateSurfaceOHOS-pSurface-parameter", "text": " pSurface must be a valid pointer to a VkSurfaceKHR handle" } ] }, - "VkOHOSSurfaceCreateInfoOpenHarmony": { - "(VK_KHR_surface)+(VK_OpenHarmony_OHOS_surface)": [ + "VkSurfaceCreateInfoOHOS": { + "(VK_KHR_surface)+(VK_OHOS_surface)": [ { - "vuid": "VUID-VkOHOSSurfaceCreateInfoOpenHarmony-window-01248", + "vuid": "VUID-VkSurfaceCreateInfoOHOS-window-01248", "text": " window must point to a valid OHOS ANativeWindow" }, { - "vuid": "VUID-VkOHOSSurfaceCreateInfoOpenHarmony-sType-sType", - "text": " sType must be VK_STRUCTURE_TYPE_OHOS_SURFACE_CREATE_INFO_OPENHARMONY" + "vuid": "VUID-VkSurfaceCreateInfoOHOS-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SURFACE_CREATE_INFO_OHOS" }, { - "vuid": "VUID-VkOHOSSurfaceCreateInfoOpenHarmony-pNext-pNext", + "vuid": "VUID-VkSurfaceCreateInfoOHOS-pNext-pNext", "text": " pNext must be NULL" }, { - "vuid": "VUID-VkOHOSSurfaceCreateInfoOpenHarmony-flags-zerobitmask", + "vuid": "VUID-VkSurfaceCreateInfoOHOS-flags-zerobitmask", "text": " flags must be 0" } ] diff --git a/registry/vk.xml b/registry/vk.xml index d0fc9ee..893fbf8 100644 --- a/registry/vk.xml +++ b/registry/vk.xml @@ -34,7 +34,7 @@ branch of the member gitlab server. - + @@ -75,8 +75,7 @@ branch of the member gitlab server. - - + @@ -91,6 +90,7 @@ branch of the member gitlab server. + @@ -129,6 +129,7 @@ branch of the member gitlab server. + @@ -203,7 +204,7 @@ branch of the member gitlab server. struct ANativeWindow; struct AHardwareBuffer; - struct OHNativeWindow; + typedef struct NativeWindow OHNativeWindow; struct OH_NativeBuffer; #ifdef __OBJC__ @class CAMetalLayer; @@ -382,7 +383,7 @@ typedef void* MTLSharedEvent_id; typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP; typedef VkFlags VkHeadlessSurfaceCreateFlagsEXT; typedef VkFlags VkScreenSurfaceCreateFlagsQNX; - typedef VkFlags VkOHOSSurfaceCreateFlagsOpenHarmony; + typedef VkFlags VkSurfaceCreateFlagsOHOS; typedef VkFlags VkPeerMemoryFeatureFlags; typedef VkFlags VkMemoryAllocateFlags; @@ -485,7 +486,8 @@ typedef void* MTLSharedEvent_id; typedef VkFlags VkVideoEncodeH265OutputModeFlagsEXT; typedef VkFlags VkVideoEncodeH265CtbSizeFlagsEXT; typedef VkFlags VkVideoEncodeH265TransformBlockSizeFlagsEXT; - typedef VkFlags VkSwapchainImageUsageFlagsOpenHarmony; + typedef VkFlags VkSwapchainImageUsageFlagsOHOS; + Types which can be void pointers or class pointers, selected at compile time VK_DEFINE_HANDLE(VkInstance) VK_DEFINE_HANDLE(VkPhysicalDevice) @@ -798,7 +800,7 @@ typedef void* MTLSharedEvent_id; - + Enumerated types in the header, but not used by the API @@ -2038,11 +2040,11 @@ typedef void* MTLSharedEvent_id; struct _screen_context* context struct _screen_window* window - - VkStructureType sType + + VkStructureType sType const void* pNext - VkOHOSSurfaceCreateFlagsOpenHarmony flags - struct OHNativeWindow* window + VkSurfaceCreateFlagsOHOS flags + OHNativeWindow* window VkFormat formatSupported pair of rendering format @@ -3480,28 +3482,28 @@ typedef void* MTLSharedEvent_id; int usage VkNativeBufferUsage2ANDROID usage2 - - VkStructureType sType - const void* pNext - const void* handle - VkStructureType sType const void* pNext VkSwapchainImageUsageFlagsANDROID usage - - VkStructureType sType - const void* pNext - VkSwapchainImageUsageFlagsOpenHarmony usage - VkStructureType sType const void* pNext VkBool32 sharedImage - - VkStructureType sType + + VkStructureType sType + const void* pNext + BufferHandle* handle + + + VkStructureType sType + const void* pNext + VkSwapchainImageUsageFlagsOHOS usage + + + VkStructureType sType const void* pNext VkBool32 sharedImage @@ -3894,43 +3896,22 @@ typedef void* MTLSharedEvent_id; const void* pNext struct AHardwareBuffer* buffer - - VkStructureType sType - const void* pNext - struct OH_NativeBuffer* buffer - VkStructureType sType void* pNext uint64_t androidHardwareBufferUsage - - VkStructureType sType - void* pNext - uint64_t OHOSNativeBufferUsage - VkStructureType sType void* pNext VkDeviceSize allocationSize uint32_t memoryTypeBits - - VkStructureType sType - void* pNext - VkDeviceSize allocationSize - uint32_t memoryTypeBits - VkStructureType sType const void* pNext VkDeviceMemory memory - - VkStructureType sType - const void* pNext - VkDeviceMemory memory - VkStructureType sType void* pNext @@ -3943,18 +3924,6 @@ typedef void* MTLSharedEvent_id; VkChromaLocation suggestedXChromaOffset VkChromaLocation suggestedYChromaOffset - - VkStructureType sType - void* pNext - VkFormat format - uint64_t externalFormat - VkFormatFeatureFlags formatFeatures - VkComponentMapping samplerYcbcrConversionComponents - VkSamplerYcbcrModelConversion suggestedYcbcrModel - VkSamplerYcbcrRange suggestedYcbcrRange - VkChromaLocation suggestedXChromaOffset - VkChromaLocation suggestedYChromaOffset - VkStructureType sType const void* pNext @@ -3965,8 +3934,41 @@ typedef void* MTLSharedEvent_id; void* pNext uint64_t externalFormat - - VkStructureType sType + + VkStructureType sType + const void* pNext + struct OH_NativeBuffer* buffer + + + VkStructureType sType + void* pNext + uint64_t OHOSNativeBufferUsage + + + VkStructureType sType + void* pNext + VkDeviceSize allocationSize + uint32_t memoryTypeBits + + + VkStructureType sType + const void* pNext + VkDeviceMemory memory + + + VkStructureType sType + void* pNext + VkFormat format + uint64_t externalFormat + VkFormatFeatureFlags formatFeatures + VkComponentMapping samplerYcbcrConversionComponents + VkSamplerYcbcrModelConversion suggestedYcbcrModel + VkSamplerYcbcrRange suggestedYcbcrRange + VkChromaLocation suggestedXChromaOffset + VkChromaLocation suggestedYChromaOffset + + + VkStructureType sType void* pNext uint64_t externalFormat @@ -8398,8 +8400,8 @@ typedef void* MTLSharedEvent_id; - - + + @@ -10548,19 +10550,6 @@ typedef void* MTLSharedEvent_id; const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface - - VkResult vkCreateOHOSSurfaceOpenHarmony - VkInstance instance - const VkOHOSSurfaceCreateInfoOpenHarmony* pCreateInfo - const VkAllocationCallbacks* pAllocator - VkSurfaceKHR* pSurface - - - VkResult vkGetOHOSNativeBufferPropertiesOpenHarmony - VkDevice device - const struct OH_NativeBuffer* buffer - VkOHOSNativeBufferPropertiesOpenHarmony* pProperties - VkResult vkGetPhysicalDeviceDisplayPropertiesKHR VkPhysicalDevice physicalDevice @@ -11451,13 +11440,6 @@ typedef void* MTLSharedEvent_id; VkImageUsageFlags imageUsage int* grallocUsage - - VkResult vkGetSwapchainGrallocUsageOpenHarmony - VkDevice device - VkFormat format - VkImageUsageFlags imageUsage - int* grallocUsage - VkResult vkGetSwapchainGrallocUsage2ANDROID VkDevice device @@ -11475,13 +11457,6 @@ typedef void* MTLSharedEvent_id; VkSemaphore semaphore VkFence fence - - VkResult vkSetNativeFenceFdOpenHarmony - VkDevice device - int32_t nativeFenceFd - VkSemaphore semaphore - VkFence fence - VkResult vkQueueSignalReleaseImageANDROID VkQueue queue @@ -11490,8 +11465,42 @@ typedef void* MTLSharedEvent_id; VkImage image int* pNativeFenceFd - - VkResult vkGetNativeFenceFdOpenHarmony + + VkResult vkCreateSurfaceOHOS + VkInstance instance + const VkSurfaceCreateInfoOHOS* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkResult vkGetNativeBufferPropertiesOHOS + VkDevice device + const struct OH_NativeBuffer* buffer + VkNativeBufferPropertiesOHOS* pProperties + + + VkResult vkGetMemoryNativeBufferOHOS + VkDevice device + const VkMemoryGetNativeBufferInfoOHOS* pInfo + struct OH_NativeBuffer** pBuffer + + + VkResult vkGetSwapchainGrallocUsageOHOS + VkDevice device + VkFormat format + VkImageUsageFlags imageUsage + uint64_t* grallocUsage + + + VkResult vkAcquireImageOHOS + VkDevice device + VkImage image + int32_t nativeFenceFd + VkSemaphore semaphore + VkFence fence + + + VkResult vkQueueSignalReleaseImageOHOS VkQueue queue uint32_t waitSemaphoreCount const VkSemaphore* pWaitSemaphores @@ -11660,12 +11669,6 @@ typedef void* MTLSharedEvent_id; const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo struct AHardwareBuffer** pBuffer - - VkResult vkGetMemoryOHOSNativeBufferOpenHarmony - VkDevice device - const VkMemoryGetOHOSNativeBufferInfoOpenHarmony* pInfo - struct OH_NativeBuffer** pBuffer - void vkCmdDrawIndirectCount VkCommandBuffer commandBuffer @@ -20546,54 +20549,54 @@ typedef void* MTLSharedEvent_id; - + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + VK_OHOS_native_buffer is used between the OpenharmonyOS Vulkan loader and drivers to implement the WSI extensions. - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +