2022-05-06 06:51:16 +00:00
|
|
|
#ifndef VULKAN_OHOS_H_
|
|
|
|
#define VULKAN_OHOS_H_ 1
|
|
|
|
|
|
|
|
/*
|
|
|
|
** Copyright 2015-2021 The Khronos Group Inc.
|
|
|
|
**
|
|
|
|
** SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
|
|
**
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-08-27 02:39:32 +00:00
|
|
|
#define VK_OpenHarmony_OHOS_surface 1
|
|
|
|
struct NativeWindow;
|
|
|
|
#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 {
|
2022-05-06 06:51:16 +00:00
|
|
|
VkStructureType sType;
|
|
|
|
const void* pNext;
|
2022-08-27 02:39:32 +00:00
|
|
|
VkOHOSSurfaceCreateFlagsOpenHarmony flags;
|
|
|
|
NativeWindow* window;
|
|
|
|
} VkOHOSSurfaceCreateInfoOpenHarmony;
|
2022-05-06 06:51:16 +00:00
|
|
|
|
2022-08-27 02:39:32 +00:00
|
|
|
typedef VkResult (VKAPI_PTR *PFN_vkCreateOHOSSurfaceOpenHarmony)(VkInstance instance, const VkOHOSSurfaceCreateInfoOpenHarmony* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
2022-05-06 06:51:16 +00:00
|
|
|
|
|
|
|
#ifndef VK_NO_PROTOTYPES
|
2022-08-27 02:39:32 +00:00
|
|
|
VKAPI_ATTR VkResult VKAPI_CALL vkCreateOHOSSurfaceOpenHarmony(
|
2022-05-06 06:51:16 +00:00
|
|
|
VkInstance instance,
|
2022-08-27 02:39:32 +00:00
|
|
|
const VkOHOSSurfaceCreateInfoOpenHarmony* pCreateInfo,
|
2022-05-06 06:51:16 +00:00
|
|
|
const VkAllocationCallbacks* pAllocator,
|
|
|
|
VkSurfaceKHR* pSurface);
|
|
|
|
#endif
|
|
|
|
|
2022-08-27 02:39:32 +00:00
|
|
|
#define VK_OpenHarmony_external_memory_OHOS_native_buffer 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 {
|
|
|
|
VkStructureType sType;
|
|
|
|
void* pNext;
|
|
|
|
uint64_t OHOSNativeBufferUsage;
|
|
|
|
} VkOHOSNativeBufferUsageOpenHarmony;
|
|
|
|
|
|
|
|
typedef struct VkOHOSNativeBufferPropertiesOpenHarmony {
|
|
|
|
VkStructureType sType;
|
|
|
|
void* pNext;
|
|
|
|
VkDeviceSize allocationSize;
|
|
|
|
uint32_t memoryTypeBits;
|
|
|
|
} VkOHOSNativeBufferPropertiesOpenHarmony;
|
|
|
|
|
|
|
|
typedef struct VkOHOSNativeBufferFormatPropertiesOpenHarmony {
|
|
|
|
VkStructureType sType;
|
|
|
|
void* pNext;
|
|
|
|
VkFormat format;
|
|
|
|
uint64_t externalFormat;
|
|
|
|
VkFormatFeatureFlags formatFeatures;
|
|
|
|
VkComponentMapping samplerYcbcrConversionComponents;
|
|
|
|
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
|
|
|
|
VkSamplerYcbcrRange suggestedYcbcrRange;
|
|
|
|
VkChromaLocation suggestedXChromaOffset;
|
|
|
|
VkChromaLocation suggestedYChromaOffset;
|
|
|
|
} VkOHOSNativeBufferFormatPropertiesOpenHarmony;
|
|
|
|
|
|
|
|
typedef struct VkImportOHOSNativeBufferInfoOpenHarmony {
|
|
|
|
VkStructureType sType;
|
|
|
|
const void* pNext;
|
|
|
|
struct OH_NativeBuffer* buffer;
|
|
|
|
} VkImportOHOSNativeBufferInfoOpenHarmony;
|
|
|
|
|
|
|
|
typedef struct VkMemoryGetOHOSNativeBufferInfoOpenHarmony {
|
|
|
|
VkStructureType sType;
|
|
|
|
const void* pNext;
|
|
|
|
VkDeviceMemory memory;
|
|
|
|
} VkMemoryGetOHOSNativeBufferInfoOpenHarmony;
|
|
|
|
|
|
|
|
typedef struct VkExternalFormatOpenHarmony {
|
|
|
|
VkStructureType sType;
|
|
|
|
void* pNext;
|
|
|
|
uint64_t externalFormat;
|
|
|
|
} VkExternalFormatOpenHarmony;
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
#ifndef VK_NO_PROTOTYPES
|
|
|
|
VKAPI_ATTR VkResult VKAPI_CALL vkGetOHOSNativeBufferPropertiesOpenHarmony(
|
|
|
|
VkDevice device,
|
|
|
|
const struct OH_NativeBuffer* buffer,
|
|
|
|
VkOHOSNativeBufferPropertiesOpenHarmony* pProperties);
|
|
|
|
|
|
|
|
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryOHOSNativeBufferOpenHarmony(
|
|
|
|
VkDevice device,
|
|
|
|
const VkMemoryGetOHOSNativeBufferInfoOpenHarmony* pInfo,
|
|
|
|
struct OH_NativeBuffer** pBuffer);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2022-05-06 06:51:16 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|