| 1 |
#ifndef VULKAN_OHOS_H_ |
| 2 |
#define VULKAN_OHOS_H_ 1 |
| 3 |
|
| 4 |
/* |
| 5 |
** Copyright 2015-2026 The Khronos Group Inc. |
| 6 |
** |
| 7 |
** SPDX-License-Identifier: Apache-2.0 |
| 8 |
*/ |
| 9 |
|
| 10 |
/* |
| 11 |
** This header is generated from the Khronos Vulkan XML API Registry. |
| 12 |
** |
| 13 |
*/ |
| 14 |
|
| 15 |
|
| 16 |
#ifdef __cplusplus |
| 17 |
extern "C" { |
| 18 |
#endif |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
// VK_OHOS_external_memory is a preprocessor guard. Do not pass it to API calls. |
| 23 |
#define VK_OHOS_external_memory 1 |
| 24 |
struct OH_NativeBuffer; |
| 25 |
#define VK_OHOS_EXTERNAL_MEMORY_SPEC_VERSION 1 |
| 26 |
#define VK_OHOS_EXTERNAL_MEMORY_EXTENSION_NAME "VK_OHOS_external_memory" |
| 27 |
typedef struct VkNativeBufferUsageOHOS { |
| 28 |
VkStructureType sType; |
| 29 |
void* pNext; |
| 30 |
uint64_t OHOSNativeBufferUsage; |
| 31 |
} VkNativeBufferUsageOHOS; |
| 32 |
|
| 33 |
typedef struct VkNativeBufferPropertiesOHOS { |
| 34 |
VkStructureType sType; |
| 35 |
void* pNext; |
| 36 |
VkDeviceSize allocationSize; |
| 37 |
uint32_t memoryTypeBits; |
| 38 |
} VkNativeBufferPropertiesOHOS; |
| 39 |
|
| 40 |
typedef struct VkNativeBufferFormatPropertiesOHOS { |
| 41 |
VkStructureType sType; |
| 42 |
void* pNext; |
| 43 |
VkFormat format; |
| 44 |
uint64_t externalFormat; |
| 45 |
VkFormatFeatureFlags formatFeatures; |
| 46 |
VkComponentMapping samplerYcbcrConversionComponents; |
| 47 |
VkSamplerYcbcrModelConversion suggestedYcbcrModel; |
| 48 |
VkSamplerYcbcrRange suggestedYcbcrRange; |
| 49 |
VkChromaLocation suggestedXChromaOffset; |
| 50 |
VkChromaLocation suggestedYChromaOffset; |
| 51 |
} VkNativeBufferFormatPropertiesOHOS; |
| 52 |
|
| 53 |
typedef struct VkImportNativeBufferInfoOHOS { |
| 54 |
VkStructureType sType; |
| 55 |
const void* pNext; |
| 56 |
struct OH_NativeBuffer* buffer; |
| 57 |
} VkImportNativeBufferInfoOHOS; |
| 58 |
|
| 59 |
typedef struct VkMemoryGetNativeBufferInfoOHOS { |
| 60 |
VkStructureType sType; |
| 61 |
const void* pNext; |
| 62 |
VkDeviceMemory memory; |
| 63 |
} VkMemoryGetNativeBufferInfoOHOS; |
| 64 |
|
| 65 |
typedef struct VkExternalFormatOHOS { |
| 66 |
VkStructureType sType; |
| 67 |
void* pNext; |
| 68 |
uint64_t externalFormat; |
| 69 |
} VkExternalFormatOHOS; |
| 70 |
|
| 71 |
typedef VkResult (VKAPI_PTR *PFN_vkGetNativeBufferPropertiesOHOS)(VkDevice device, const struct OH_NativeBuffer* buffer, VkNativeBufferPropertiesOHOS* pProperties); |
| 72 |
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryNativeBufferOHOS)(VkDevice device, const VkMemoryGetNativeBufferInfoOHOS* pInfo, struct OH_NativeBuffer** pBuffer); |
| 73 |
|
| 74 |
#ifndef VK_NO_PROTOTYPES |
| 75 |
#ifndef VK_ONLY_EXPORTED_PROTOTYPES |
| 76 |
VKAPI_ATTR VkResult VKAPI_CALL vkGetNativeBufferPropertiesOHOS( |
| 77 |
VkDevice device, |
| 78 |
const struct OH_NativeBuffer* buffer, |
| 79 |
VkNativeBufferPropertiesOHOS* pProperties); |
| 80 |
#endif |
| 81 |
|
| 82 |
#ifndef VK_ONLY_EXPORTED_PROTOTYPES |
| 83 |
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryNativeBufferOHOS( |
| 84 |
VkDevice device, |
| 85 |
const VkMemoryGetNativeBufferInfoOHOS* pInfo, |
| 86 |
struct OH_NativeBuffer** pBuffer); |
| 87 |
#endif |
| 88 |
#endif |
| 89 |
|
| 90 |
|
| 91 |
// VK_OHOS_surface is a preprocessor guard. Do not pass it to API calls. |
| 92 |
#define VK_OHOS_surface 1 |
| 93 |
typedef struct NativeWindow OHNativeWindow; |
| 94 |
#define VK_OHOS_SURFACE_SPEC_VERSION 1 |
| 95 |
#define VK_OHOS_SURFACE_EXTENSION_NAME "VK_OHOS_surface" |
| 96 |
typedef VkFlags VkSurfaceCreateFlagsOHOS; |
| 97 |
typedef struct VkSurfaceCreateInfoOHOS { |
| 98 |
VkStructureType sType; |
| 99 |
const void* pNext; |
| 100 |
VkSurfaceCreateFlagsOHOS flags; |
| 101 |
OHNativeWindow* window; |
| 102 |
} VkSurfaceCreateInfoOHOS; |
| 103 |
|
| 104 |
typedef VkResult (VKAPI_PTR *PFN_vkCreateSurfaceOHOS)(VkInstance instance, const VkSurfaceCreateInfoOHOS* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); |
| 105 |
|
| 106 |
#ifndef VK_NO_PROTOTYPES |
| 107 |
#ifndef VK_ONLY_EXPORTED_PROTOTYPES |
| 108 |
VKAPI_ATTR VkResult VKAPI_CALL vkCreateSurfaceOHOS( |
| 109 |
VkInstance instance, |
| 110 |
const VkSurfaceCreateInfoOHOS* pCreateInfo, |
| 111 |
const VkAllocationCallbacks* pAllocator, |
| 112 |
VkSurfaceKHR* pSurface); |
| 113 |
#endif |
| 114 |
#endif |
| 115 |
|
| 116 |
#ifdef __cplusplus |
| 117 |
} |
| 118 |
#endif |
| 119 |
|
| 120 |
#endif |