1e8556ba3Sopenharmony_ci#ifndef VULKAN_ANDROID_H_
2e8556ba3Sopenharmony_ci#define VULKAN_ANDROID_H_ 1
3e8556ba3Sopenharmony_ci
4e8556ba3Sopenharmony_ci/*
5e8556ba3Sopenharmony_ci** Copyright 2015-2024 The Khronos Group Inc.
6e8556ba3Sopenharmony_ci**
7e8556ba3Sopenharmony_ci** SPDX-License-Identifier: Apache-2.0
8e8556ba3Sopenharmony_ci*/
9e8556ba3Sopenharmony_ci
10e8556ba3Sopenharmony_ci/*
11e8556ba3Sopenharmony_ci** This header is generated from the Khronos Vulkan XML API Registry.
12e8556ba3Sopenharmony_ci**
13e8556ba3Sopenharmony_ci*/
14e8556ba3Sopenharmony_ci
15e8556ba3Sopenharmony_ci
16e8556ba3Sopenharmony_ci#ifdef __cplusplus
17e8556ba3Sopenharmony_ciextern "C" {
18e8556ba3Sopenharmony_ci#endif
19e8556ba3Sopenharmony_ci
20e8556ba3Sopenharmony_ci
21e8556ba3Sopenharmony_ci
22e8556ba3Sopenharmony_ci// VK_KHR_android_surface is a preprocessor guard. Do not pass it to API calls.
23e8556ba3Sopenharmony_ci#define VK_KHR_android_surface 1
24e8556ba3Sopenharmony_cistruct ANativeWindow;
25e8556ba3Sopenharmony_ci#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
26e8556ba3Sopenharmony_ci#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
27e8556ba3Sopenharmony_citypedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
28e8556ba3Sopenharmony_citypedef struct VkAndroidSurfaceCreateInfoKHR {
29e8556ba3Sopenharmony_ci    VkStructureType                   sType;
30e8556ba3Sopenharmony_ci    const void*                       pNext;
31e8556ba3Sopenharmony_ci    VkAndroidSurfaceCreateFlagsKHR    flags;
32e8556ba3Sopenharmony_ci    struct ANativeWindow*             window;
33e8556ba3Sopenharmony_ci} VkAndroidSurfaceCreateInfoKHR;
34e8556ba3Sopenharmony_ci
35e8556ba3Sopenharmony_citypedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
36e8556ba3Sopenharmony_ci
37e8556ba3Sopenharmony_ci#ifndef VK_NO_PROTOTYPES
38e8556ba3Sopenharmony_ciVKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
39e8556ba3Sopenharmony_ci    VkInstance                                  instance,
40e8556ba3Sopenharmony_ci    const VkAndroidSurfaceCreateInfoKHR*        pCreateInfo,
41e8556ba3Sopenharmony_ci    const VkAllocationCallbacks*                pAllocator,
42e8556ba3Sopenharmony_ci    VkSurfaceKHR*                               pSurface);
43e8556ba3Sopenharmony_ci#endif
44e8556ba3Sopenharmony_ci
45e8556ba3Sopenharmony_ci
46e8556ba3Sopenharmony_ci// VK_ANDROID_external_memory_android_hardware_buffer is a preprocessor guard. Do not pass it to API calls.
47e8556ba3Sopenharmony_ci#define VK_ANDROID_external_memory_android_hardware_buffer 1
48e8556ba3Sopenharmony_cistruct AHardwareBuffer;
49e8556ba3Sopenharmony_ci#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 5
50e8556ba3Sopenharmony_ci#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
51e8556ba3Sopenharmony_citypedef struct VkAndroidHardwareBufferUsageANDROID {
52e8556ba3Sopenharmony_ci    VkStructureType    sType;
53e8556ba3Sopenharmony_ci    void*              pNext;
54e8556ba3Sopenharmony_ci    uint64_t           androidHardwareBufferUsage;
55e8556ba3Sopenharmony_ci} VkAndroidHardwareBufferUsageANDROID;
56e8556ba3Sopenharmony_ci
57e8556ba3Sopenharmony_citypedef struct VkAndroidHardwareBufferPropertiesANDROID {
58e8556ba3Sopenharmony_ci    VkStructureType    sType;
59e8556ba3Sopenharmony_ci    void*              pNext;
60e8556ba3Sopenharmony_ci    VkDeviceSize       allocationSize;
61e8556ba3Sopenharmony_ci    uint32_t           memoryTypeBits;
62e8556ba3Sopenharmony_ci} VkAndroidHardwareBufferPropertiesANDROID;
63e8556ba3Sopenharmony_ci
64e8556ba3Sopenharmony_citypedef struct VkAndroidHardwareBufferFormatPropertiesANDROID {
65e8556ba3Sopenharmony_ci    VkStructureType                  sType;
66e8556ba3Sopenharmony_ci    void*                            pNext;
67e8556ba3Sopenharmony_ci    VkFormat                         format;
68e8556ba3Sopenharmony_ci    uint64_t                         externalFormat;
69e8556ba3Sopenharmony_ci    VkFormatFeatureFlags             formatFeatures;
70e8556ba3Sopenharmony_ci    VkComponentMapping               samplerYcbcrConversionComponents;
71e8556ba3Sopenharmony_ci    VkSamplerYcbcrModelConversion    suggestedYcbcrModel;
72e8556ba3Sopenharmony_ci    VkSamplerYcbcrRange              suggestedYcbcrRange;
73e8556ba3Sopenharmony_ci    VkChromaLocation                 suggestedXChromaOffset;
74e8556ba3Sopenharmony_ci    VkChromaLocation                 suggestedYChromaOffset;
75e8556ba3Sopenharmony_ci} VkAndroidHardwareBufferFormatPropertiesANDROID;
76e8556ba3Sopenharmony_ci
77e8556ba3Sopenharmony_citypedef struct VkImportAndroidHardwareBufferInfoANDROID {
78e8556ba3Sopenharmony_ci    VkStructureType            sType;
79e8556ba3Sopenharmony_ci    const void*                pNext;
80e8556ba3Sopenharmony_ci    struct AHardwareBuffer*    buffer;
81e8556ba3Sopenharmony_ci} VkImportAndroidHardwareBufferInfoANDROID;
82e8556ba3Sopenharmony_ci
83e8556ba3Sopenharmony_citypedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID {
84e8556ba3Sopenharmony_ci    VkStructureType    sType;
85e8556ba3Sopenharmony_ci    const void*        pNext;
86e8556ba3Sopenharmony_ci    VkDeviceMemory     memory;
87e8556ba3Sopenharmony_ci} VkMemoryGetAndroidHardwareBufferInfoANDROID;
88e8556ba3Sopenharmony_ci
89e8556ba3Sopenharmony_citypedef struct VkExternalFormatANDROID {
90e8556ba3Sopenharmony_ci    VkStructureType    sType;
91e8556ba3Sopenharmony_ci    void*              pNext;
92e8556ba3Sopenharmony_ci    uint64_t           externalFormat;
93e8556ba3Sopenharmony_ci} VkExternalFormatANDROID;
94e8556ba3Sopenharmony_ci
95e8556ba3Sopenharmony_citypedef struct VkAndroidHardwareBufferFormatProperties2ANDROID {
96e8556ba3Sopenharmony_ci    VkStructureType                  sType;
97e8556ba3Sopenharmony_ci    void*                            pNext;
98e8556ba3Sopenharmony_ci    VkFormat                         format;
99e8556ba3Sopenharmony_ci    uint64_t                         externalFormat;
100e8556ba3Sopenharmony_ci    VkFormatFeatureFlags2            formatFeatures;
101e8556ba3Sopenharmony_ci    VkComponentMapping               samplerYcbcrConversionComponents;
102e8556ba3Sopenharmony_ci    VkSamplerYcbcrModelConversion    suggestedYcbcrModel;
103e8556ba3Sopenharmony_ci    VkSamplerYcbcrRange              suggestedYcbcrRange;
104e8556ba3Sopenharmony_ci    VkChromaLocation                 suggestedXChromaOffset;
105e8556ba3Sopenharmony_ci    VkChromaLocation                 suggestedYChromaOffset;
106e8556ba3Sopenharmony_ci} VkAndroidHardwareBufferFormatProperties2ANDROID;
107e8556ba3Sopenharmony_ci
108e8556ba3Sopenharmony_citypedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
109e8556ba3Sopenharmony_citypedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
110e8556ba3Sopenharmony_ci
111e8556ba3Sopenharmony_ci#ifndef VK_NO_PROTOTYPES
112e8556ba3Sopenharmony_ciVKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID(
113e8556ba3Sopenharmony_ci    VkDevice                                    device,
114e8556ba3Sopenharmony_ci    const struct AHardwareBuffer*               buffer,
115e8556ba3Sopenharmony_ci    VkAndroidHardwareBufferPropertiesANDROID*   pProperties);
116e8556ba3Sopenharmony_ci
117e8556ba3Sopenharmony_ciVKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID(
118e8556ba3Sopenharmony_ci    VkDevice                                    device,
119e8556ba3Sopenharmony_ci    const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
120e8556ba3Sopenharmony_ci    struct AHardwareBuffer**                    pBuffer);
121e8556ba3Sopenharmony_ci#endif
122e8556ba3Sopenharmony_ci
123e8556ba3Sopenharmony_ci
124e8556ba3Sopenharmony_ci// VK_ANDROID_external_format_resolve is a preprocessor guard. Do not pass it to API calls.
125e8556ba3Sopenharmony_ci#define VK_ANDROID_external_format_resolve 1
126e8556ba3Sopenharmony_ci#define VK_ANDROID_EXTERNAL_FORMAT_RESOLVE_SPEC_VERSION 1
127e8556ba3Sopenharmony_ci#define VK_ANDROID_EXTERNAL_FORMAT_RESOLVE_EXTENSION_NAME "VK_ANDROID_external_format_resolve"
128e8556ba3Sopenharmony_citypedef struct VkPhysicalDeviceExternalFormatResolveFeaturesANDROID {
129e8556ba3Sopenharmony_ci    VkStructureType    sType;
130e8556ba3Sopenharmony_ci    void*              pNext;
131e8556ba3Sopenharmony_ci    VkBool32           externalFormatResolve;
132e8556ba3Sopenharmony_ci} VkPhysicalDeviceExternalFormatResolveFeaturesANDROID;
133e8556ba3Sopenharmony_ci
134e8556ba3Sopenharmony_citypedef struct VkPhysicalDeviceExternalFormatResolvePropertiesANDROID {
135e8556ba3Sopenharmony_ci    VkStructureType     sType;
136e8556ba3Sopenharmony_ci    void*               pNext;
137e8556ba3Sopenharmony_ci    VkBool32            nullColorAttachmentWithExternalFormatResolve;
138e8556ba3Sopenharmony_ci    VkChromaLocation    externalFormatResolveChromaOffsetX;
139e8556ba3Sopenharmony_ci    VkChromaLocation    externalFormatResolveChromaOffsetY;
140e8556ba3Sopenharmony_ci} VkPhysicalDeviceExternalFormatResolvePropertiesANDROID;
141e8556ba3Sopenharmony_ci
142e8556ba3Sopenharmony_citypedef struct VkAndroidHardwareBufferFormatResolvePropertiesANDROID {
143e8556ba3Sopenharmony_ci    VkStructureType    sType;
144e8556ba3Sopenharmony_ci    void*              pNext;
145e8556ba3Sopenharmony_ci    VkFormat           colorAttachmentFormat;
146e8556ba3Sopenharmony_ci} VkAndroidHardwareBufferFormatResolvePropertiesANDROID;
147e8556ba3Sopenharmony_ci
148e8556ba3Sopenharmony_ci
149e8556ba3Sopenharmony_ci#ifdef __cplusplus
150e8556ba3Sopenharmony_ci}
151e8556ba3Sopenharmony_ci#endif
152e8556ba3Sopenharmony_ci
153e8556ba3Sopenharmony_ci#endif
154