vulkan_ohos.h 4.0 KB

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